Theory
In 'A as a fraction of B', A is the numerator and B is the denominator. The second named amount is the reference whole, even when A is larger than B.
For example, 3 as a fraction of 8 is 3/8. But 8 as a fraction of 3 is 8/3, which is greater than 1. These are different questions, so keep the word order.
Convert to the same unit first. To write 50 cm as a fraction of 2 m, change 2 m to 200 cm, then use 50/200 = 1/4.
Simplify by dividing numerator and denominator by the same common factor. You can leave a result such as 3/2 as an improper fraction when the question asks for a fraction; it means one and a half times the reference amount.
This is not automatically a fraction of a combined total. If A:B = 2:3, A as a fraction of B is 2/3, but A as a fraction of A + B is 2/5.