Let's call pizza p and soft drink s
5 p + 5 s = 21.75
5 (p+s) = 21.75
p+s = 21.75/5
p + s = 4.35
now we know that 1 slice of pizza and 1 drink costs $4.35
s = 4.35 - p
and
p = 4.35 -s
now to the other part of 7 slices of pizza and 6 soft drinks
7 p + 6 s = 29.16
lets solve for p the pizza
plug in 4.35 - p
7p + 6 (4.35 - p) = 29.96
7p + 26.10 - 6p = 29.96
7p-6p = 29.96 -26.10
p = 3.86
pizza = p = $3.86 per slice
let solve for s the soft drink
4.35 - p = s
4.35 - 3.86 = .49 for the soft drink
lets check
7p + 6s = 29.96
7 x 3.86 = 27.02
6 X .49 = 2.94
27.02 + 2.97 = 29.97
so really pizza would probably be 3.85 and the soft drink is .50
the numebrs came out strange due to rounding
5 p + 5 s = 21.75
5 (p+s) = 21.75
p+s = 21.75/5
p + s = 4.35
now we know that 1 slice of pizza and 1 drink costs $4.35
s = 4.35 - p
and
p = 4.35 -s
now to the other part of 7 slices of pizza and 6 soft drinks
7 p + 6 s = 29.16
lets solve for p the pizza
plug in 4.35 - p
7p + 6 (4.35 - p) = 29.96
7p + 26.10 - 6p = 29.96
7p-6p = 29.96 -26.10
p = 3.86
pizza = p = $3.86 per slice
let solve for s the soft drink
4.35 - p = s
4.35 - 3.86 = .49 for the soft drink
lets check
7p + 6s = 29.96
7 x 3.86 = 27.02
6 X .49 = 2.94
27.02 + 2.97 = 29.97
so really pizza would probably be 3.85 and the soft drink is .50
the numebrs came out strange due to rounding