there are 2 ways to do this...
(1) find the unit price......4 bags for 24.24.....24.24 / 4 = 6.06 per bag
so 3 bags would cost : (6.06 * 3) = 18.18 <==
(2) or proportion
4 / 24.24 = 3 / x.....4 bags to 24.24 = 3 bags to x
cross multiply
(4)(x) = (24.24)(3)
4x = 72.72
x = 72.72 / 4
x = 18.18 <===