We can infer that more cups of flour are needed as the cakes are increased, so we can apply a rule of three, simple with direct proportion to find the answer:
12 cakes ----> 22 cups flour
30 cakes ----> x
x = (30)(22)/12
x = 55
therefore 55 cups of flour are needed to bake 30 cakes