Here simply choose the ratio for the firsts box, it might be in lowest terms, which you can find out by dividing the 2 numbers by the common factor which is 8, so in simplified terms it would be:
1 : 6.
So using this simplified ratio,
Add 24 to 6 which is 30.
1/6 = ?/30
Solve for the ?, which is 5, if you cross multiply.