Area = pi * r^2
.
A pizza with a 7-inch diameter has a radius of 3.5 inches.
Area = pi*3.5^2 = 38.48 sq. in.
.
A pizza with a 14-inch diameter has a radius of 7 inches.
Area = pi*7^2 = 153.93 sq. in.
.
The smaller pizza costs $5 = 500 cents, so it costs 500/38.48 = about 13 cents per sq. in.
.
It costs $12 = 1200 cents, so it costs 12/153.93 = about 8 cents per sq in.
.
The larger pizza is a better buy in terms of the cost per sq. in.
.
Done, hope that helped