Equate the ratios based on the colours. So you have the ratio of Red:Pink as 3:4, and Green:Red as 1:2. Therefore you can equate the red to be the same number. LCM (lowest common multiple) of 3 and 2 is 6. So multiply each ratio respectively (i.e. 3:4 would be 6:8 and 1:2 would be 3:6). You have last ratio which is White:Green as 2:9. Here you can equate the green with the green in the Green:Red ratio, which is 3:6 (since it is already equated before with Red:Pink). Here 9 is a multiple of 3, so you can multiply the Green:Red ratio by 3 to 9:18. Since you have changed the ratio for Green:Red, you need to re-equate the Red:Pink ratio, so multiply it to be 18:24, (since you want Red to be 18, so you can have 9 Green, which in turn satisfies the White:Green ratio)
Hope you understand it well!!