Let their monthly income be 5x,4x respectively.
Let their monthly expenditure be 9y,7y respectively.
5x−9y=500 ……….(1)
4x−7y=500 ………(2)
From (1) and (2)
5x−9y=4x−7y
y=x2
From (1),
5x−9×x2=500
Or, x=1000
Their monthly income is 5000 and 4000 respectively.