How to work out the formula for the problem of 4 / 7 of 2 / 5

How to work out the formula for the problem of 4 / 7 of 2 / 5

2x7 out of 5 = 8 out of 35
A: four out of seven out of two fifths is eight out of 35