D=cost of hot dog and B=cost of burger
7D+2H=10.5
2D+7H=14.25
The solution of this pair of simultaneous linear equations is messy no matter how you do it.
The least nuisance would be to use determinants, which you probably do not know yet.
The next easiest way is to eliminate D by multiplying the 1st equation by 2 and the 2nd equation by 7.
14D+4H=21
14D+49H=99.75
Now subtract the 1st equation from the second to eliminate D.
This will give you the value for H and you then go back to get D
You do the arithmetic!