Answer: a) To find out how many dollars Mr Anil got with Rs 540,000, we'll divide the amount in Nepali rupees by the exchange rate.
- Exchange rate: 1$ = Rs 120
 - Amount in Nepali rupees: Rs 540,000
 
- Number of dollars = Amount in Nepali rupees / Exchange rate
 - Number of dollars = 540,000 / 120
 - Number of dollars = 4,500
 
Therefore, Mr Anil got 4,500 dollars with Rs 540,000.
b) After the devaluation of the Nepali rupee by 5%, the new exchange rate would be 5% less than the previous rate.
New exchange rate = Previous exchange rate - (Previous exchange rate * 5%)
- New exchange rate = 120 - (120 * 0.05)
 - New exchange rate = 120 - 6
 - New exchange rate = 114
 
The new exchange rate after the devaluation is 1$ = Rs 114.
c) To calculate how much Mr Anil gained or lost, we need to compare the initial exchange rate with the new exchange rate.
- Initial exchange rate: 1$ = Rs 120
 - New exchange rate: 1$ = Rs 114
 
Gained or lost = Number of dollars * (New exchange rate - Initial exchange rate)
- Gained or lost = 4,500 * (114 - 120)
 - Gained or lost = 4,500 * (-6)
 - Gained or lost = -27,000
 
Mr Anil lost 27,000 rupees due to the devaluation of the Nepali rupee.
d) If the bank took a 2% commission on the transaction, we need to calculate the commission amount and adjust the gain or loss accordingly.
- Commission amount = Number of dollars * (Commission rate)
 - Commission amount = 4,500 * (0.02)
 - Commission amount = 90
 
- Adjusted gain or loss = Gained or lost - Commission amount
 - Adjusted gain or loss = -27,000 - 90
 - Adjusted gain or loss = -27,090
 
After the devaluation of the Nepali rupee and considering the 2% commission, Mr Anil would lose 27,090 rupees.