This is a problem using proportions.
a/b = c/d where: ad = bc
1/4 : 5 = x : 8
a = 1/4 ; b = 5 ; c = x ; d = 8
get the cross products: ad = bc
1/4 * 8 = 5 * x
8/4 = 5x
2 = 5x
2/5 = x
2/5 of a pizza can be purchased for 8 dollars.
to check:
1/4 : 5 = 2/5 : 8
1/4 * 8 = 5 * 2/5
8/4 = 10/5
2 = 2