Here I think you can see that the middle wheels rotate
by same angle
---The wheel Y moves an equal distance as the smaller middle wheel
---Similarly the wheel Z moves the same distance as that moved by the bigger middle wheel
Now try again, I think you should get the result
If you still have trouble feel free to ask
Lets first take wheel Y
It rotates 360 degrees to complete one rotation hence
the first string rotates by a length 4pi
now this rotates the inner wheel by
distance$\displaystyle =4\pi $ hence angle moved$\displaystyle = \frac{360}{6\pi} *(4\pi) degrees $
this rotates the outer wheel by the same angle
(as they are mutually joined)
on moving by 240 degrees
the distance moved by outer wheel ,$\displaystyle x= \frac{2}{3} *2*\pi*7$
which is same as the wheel Z
so the revolution by Z $\displaystyle = \frac {x}{2*\pi*5} $
and you get the ANSWER