This is a question of proportionality. But it has to be determined whether this is direct or inverse. More cows will eat more grass in the same time; more cows will take less time to eat the same amount of grass. So the proportion of cows to grass is direct but to time it's inverse.
1 cow eats 4/24=1/6 acre of grass in 12 hours; 1 cow eats 1 acre in 6*12=72 hours. 27 cows eat 1 acre in 72/27=8/3 hours. 27 cows eat 3 acres of grass in 3*8/3=8 hours.
Alternatively, 24 cows eat 1 acre in 12/4=3 hours. 1 cow eats 1 acre in 24*3=72 hours. 1 cow eats 3 acres in 3*72=216 hours. 27 cows eat 3 acres in 216/27=8 hours.
(Algebraically, C cows eat A acres in H hours; 1 cow eats A/C acres in H hours; 1 cow eats 1 acre in CH/A hours; K cows eat 1 acre in CH/AK; K cows eat B acres in CHB/AK hours=24*12*3/(4*27)=2*4=8 hrs. Or: C cows eat 1 acre in H/A hours; 1 cow eats 1 acre in CH/A hours; 1 cow eats B acres in CHB/A hours; K cows eat B acres in CHB/AK hours.)