Answer:
 Cost for 1 burger = 5 $
 Amount spent by Janet  = 25$
 Amount spent by John = 25$
Explanation:
 Let the cost for burger be p.
 Janet got three burgers and left a $10 tip
 Amount spent by Janet  = 3 p + 10
 John bought 4 burgers, but only left a $5 tip
 Amount spent by John  = 4 p + 5
 Both paid the same amount.
  So, we have  3 p + 10 = 4 p + 5
 => p = 5 $
 So, cost for 1 burger = 5 $
 Amount spent by Janet  = 3 x 5 + 10 = 25$
 Amount spent by John  = 4 x 5  + 5 = 25$