I tried using the multinomial theorem to find general term ie.
$$T_n =\frac{7!}{a!b!c!} 1^a \cdot x^b \cdot x^{2c} $$
Now $b+2c=5$ and $a+b+c=7$
The second equation can be interpreted as distributing $7$ things in $3$ groups, ie $\binom {9}{2}$ but I don’t know what to do with the second condition, and how there solutions will overlap
How should I proceed?
with respect to $$(a+b+c)^5=\sum_{x+y+z=5} (5!)\frac{a^xb^yc^z}{x!y!z!}$$ $ax^5$ made from $$2+1+2=5\to 1^2.x^1.(x^2)^2\to \frac{5!}{2!.1!.2!}\\ 1+3+1=5 \to 1^1.(x^3).(x^2)^1\to \frac{5!}{1!.3!.1!}\\0+5+0=5 \to 1^0.(x^5).(x^2)^0 \to \frac{5!}{0!.5!.0!}$$so $$a=\frac{5!}{2!.1!.2!}+\frac{5!}{1!.3!.1!}+\frac{5!}{0!.5!.0!}$$