$$(5x^2+4y)^2 =$$
$$(5x^2+4y)\times{(5x^2+4y)} =$$
Using FOIL:
$$(5x^2\times{5x^2}) + 2(5x^2\times{4y}) + (4y\times{4y}) =$$
$$25x^4 + 40x^2y + 16y^2$$
.$$(5x^2+4y)^2 =$$
$$(5x^2+4y)\times{(5x^2+4y)} =$$
Using FOIL:
$$(5x^2\times{5x^2}) + 2(5x^2\times{4y}) + (4y\times{4y}) =$$
$$25x^4 + 40x^2y + 16y^2$$