Vahan P. answered 04/04/22
Experienced high school math teacher and experienced musician
There are two variables here - p the number of slices of pizza, and s the number of soft drinks.
From the given information you can set up the following two equations:
8p + 5s = 27.71
4p + 3s = 14.57
Now you want to solve for one of the variables by eliminating a variable. Notice that if you multiply the second equation by 2, the system becomes
8p + 5s = 27.71
8p + 6s = 29.14
Then, you can subtract the first equation from the second obtaining s = 1.43.
Now you can plug s = 1.43 into either of the equations to obtain p.
If you plug it into the first equation you have 8p + 5(1.43) = 27.71
8p + 7.15 = 27.71
8p = 20.56
p = 2.57
Thus, a slice of pizza costs $2.57 and a soft drink costs $1.43.