To find the ratio between 2 quantities, they must have the same unit of measurement
(a)
Since AM = 18 cm
Since CD = 48 cm
Then we can find the ratio between them directly because they have the same unit

We need to simplify the ratio
Since the greatest common factor of 18 and 48 is 6, then
Divide the terms of the ratio by 6 to simplify it

The ratio between AM and CD is 3: 8
(b)
Since AM = 1 m 2 cm
Since CD = 36 dm
Then we can not find the ratio directly because they have different units of measurement, then we will change both to cm
Since 1 m = 100 cm, then
AM = 1 x 100 + 2 = 102 cm
Since 1 dm = 10 cm, then
CD = 36 x 10 = 360 cm
Now, we can find the ratio between then

Since the greatest common factor of 102 and 360 is 6, then divide each term by 6 to simplify the ratio

The ratio between AM and CD is 17: 60