Let Rs. x be the part of monthly hostel charges that is fixed.
Let Rs. y be the food charge for one day.
Then, we have:
For student A:
He takes food for 25 days and pays Rs. 3500.
∴ Rs. x + Rs. 25y = Rs. 3500
⇒ x + 25y = 3500 .....(i)
For student B:
He takes food for 28 days and pays Rs. 3800.
∴ Rs. x + Rs. 28y = Rs. 3800
⇒ x + 28y = 3800 .....(ii)
On subtracting (i) from (ii), we get:
3y = (3800 − 3500)
⇒ 3y = 300
⇒ y = 100
On substituting y = 100 in (i), we get:
x + 25 × 100 = 3500
x = 3500 − 2500
x = 1000
∴ Part of the monthly hostel charges that is fixed = Rs. 1000
And, food charge per day = Rs. 100