Determine the coefficient of $xy$ in the expansion of $(x+y+2)^7$ The problem: Determine the coefficient of $xy$ in the expansion of $(x+y+2)^7$

My approach:

We can rewrite the equation substituting $x+y =j$ 

$$(x+y+2)^7=(j+2)^7$$

This is simpler because we know the coefficients thanks to the formula:

$$(a+b)^{n}=\sum _{{k=0}}^{n}{n \choose k}a^{{n-k}}b^{{k}} $$

With $n=7$  we have $1,7,21,35,35,21,7,1$ as coefficients and the expansion looks like this:

$$j^7+14\cdot j^6+(21\cdot 2^2) j^5+(35\cdot 2^3) j^4+(35\cdot 2^4) j^3+(21\cdot 2^5) j^2+(7\cdot 26)j+2^7$$

Now the only time that $xy$ appears is in the expansion of $j^2$ therefore we have:
$$(21\cdot 2^5) j^2=(21\cdot 2^5) (x+y)^2= (21\cdot 2^5)(x^2+2xy+y^2)=21\cdot 2^5x^2+21\cdot 2^6xy+21\cdot 2^5y^2$$
The coefficient is $21\cdot 2^6$

Is this correct? Is there a simpler proof?
Yes to both questions.

We can write:

$$(x+y+2)^7=\sum_{p+q+r=7}\binom7{p,q,r}2^rx^py^q$$

To get $xy$ we make $p=q=1$, so the coefficient of $xy$ is:

$$\binom7{5,1,1}2^5=\frac{7!}{5!1!1!}\cdot 2^5=42\cdot 2^5=21\cdot2^6$$
(x+y+2)(x+y+2)(x+y+2)*(4 more times).
To get xy as a coefficient you  can choose x from any block and y from any other block in 7c2 ways and since xy can be permuted in two ways you get 2*7c2 ways and for the remaining you must choose 2 from each block so you get an extra 2^5 . so coefficient is 2* 7c2 *2^5 = 21*2^6.

so for any general case (ax+by+cz+dw)^n . Coefficient of x^r1*y*r2*z^r3*w^r4 . where
r1+r2+r3+r4 = n. can be written as >>

n!*(a^r1*b^r2*c^r3*d^r4)/(r1!*r2!*r3!*r4!)