The ratio/proportion is young / old = young / old.
We know that one ratio is 3 / 5, so we need to complete the other.
3 / 5 = young / 40
5 goes into 40, 8 times, therefore we need to multiply the numerator by 8 also.
3 x 8 = 24
The younger student is 24 years old.
Hope this helps!