a = (9/6)*10 mm = 15 mm
b = (35/10)*6 mm = 21 mm
The ratio in parentheses is the ratio of corresponding sides in the respective rectangles, so is the scale factor. The unknown dimension is that scale factor applied to the corresponding known dimension.