Binomial coefficients with variable in exponent

I need to calculate the coefficient of a specific term in a binomial, but how do I do that if the exponent has a variable in it?

For example:

Find the coefficient of $$x^n$$ in the expansion of $$(4x + 5x^2)^{7n}$$

or

Find the coefficient of $$x^5$$ in the expansion of $$(3 + 2x^2)^{5n}$$

Note that these examples are not a homework problems; I do not need just the answer. I am trying to learn how to solve very similar problems because my text does not explain (and I can't figure it out).

Looking at your first example: $$(4x + 5x^2)^{7n} = \sum_{k=0}^{7n}\binom{7n}{k}4^kx^k5^{7n-k}x^{2(7n-k)}$$ So, for which of the $$k$$ we have $$k+2(7n-k)=n$$? Solving this for $$k$$ we get $$k=13n$$ which (for $$n>0$$) is not included in the sum (so the coefficient of $$x^n$$ is zero).
The second example is even easier: For any integer $$n$$, the exponents of $$x$$ in $$(3 + 2x^2)^{5n}$$ all are even...
In general, you have to write down the binomial formula (as somthing like $$\sum_{k=0}^{f(n)}\ldots$$) for your term and solve the desired equation for the exponents of $$x$$ for $$k$$. Then, knowing all these $$k$$, you can evaluate the sum for just these $$k$$ (which is probably just a single term) with $$x=1$$ to find the desired coefficient.