Solution
Let the money Gaurav inherited be equal to $X$
So, his hostel expenses equal $0.4X$
Expenses on books and stationery is $0.2X$
Remaining amount is $X - 0.4X - 0.2X = 0.4X$
Transport expenses is $50% of 0.4X = 0.2X$
Remaining amount is $0.4X - 0.2X = 0.2X$
He saves $50%$ of it, that is $0.1X$ and it equals $450$.
So, the value of $X$ is $450/0.1 = 4500$
$= 4500$