For the first case, there are 3 bales/9 days or (1/3) bales/day eaten
If there are 8 cows eating the same amount each day, then 1 cow eats (1/24) bales/day
Next, equate this to 18 bales: (1/24) bales/day = 18 bales/ x days or x = 432 days
But since there are 3 cows eating, you would decrease this by 1/3, so (1/3)(432) = 144 days