I am assuming drinks and sodas are the same thing, so I will call them both drinks.
I first translate this into math.
4 hotdogs and 2 drinks cost $8
4h+2d=8
5 hotdogs and 3 drinks cost $10.50
5h+3d=10.5
We then solve the first equation for a variable:
4h+2d=8
2d=8-4h
d=4-2h
Then we substitute this value for d into the second sentence.
5h+3(4-2h)=10.5
5h+12-6h=10.5
12-h=10.5
-h=-1.5
h=1.5
We then substitute this value for h back into one of the equations.
4(1.5)+2d=8
6+2d=8
2d=2
d=1
Hotd dogs are $1.50 and drinks are $1.