PMC 2014-15 Q8

The length and width of this picture are 8 cm and 6 cm. You can drag the red dot to enlarge or reduce the picture. (a) when its width is 3cm, what is its length? (b) when its width is 10 cm, what is its length?