Let the salary of A be \( x \), then the salary of B is \( 40,000 - x \) because their combined salary is ₹40,000.
A spends 85% of his salary, hence A's spending is \( 0.85x \), leaving him with savings of \( x - 0.85x = 0.15x \).
B spends 95% of his salary, hence B's spending is \( 0.95(40,000 - x) \), leaving B with savings of:
\((40,000 - x) - 0.95(40,000 - x) = 0.05(40,000 - x)\)
Given that their savings are equal, equate the savings of A and B:
\(0.15x = 0.05(40,000 - x)\)
Solve the equation:
\(0.15x = 2,000 - 0.05x\)
\(0.15x + 0.05x = 2,000\)
\(0.20x = 2,000\)
\(x = \frac{2,000}{0.20}\)
\(x = 10,000\)
Thus, the salary of A is ₹10,000.