Question 1023348
At the very first level are the x girls (each of which has 2 legs), so there are 2x legs.
At the second level are the x bags for each girl (but each bag has 0 legs), so there are {{{0*x^2 = 0}}} legs.
At the third level are the x cats in each bag (each of which has 4 legs) , so there are {{{x*(4x^2) = 4x^3}}} legs.
At the last level are the x kittens for each cat (each of which has 4 legs), so there are {{{x*(4x^3) = 4x^4}}} legs.

Add everything up:

{{{4x^4+4x^3+2x = 29178}}} <==> {{{2x^4+2x^3+x = 14589}}} 

since we are expecting a whole number answer for x, a little brute force gives x = 9.
(By Descartes' rule of signs x = 9 will be the only positive root.  The other real root would be negative, and the two others are complex.)