We know that Sum of all the angles should be 90 degree for it to be complementary...
Let the angles be x and y degrees..
A/Q,
x-y=40........(1)
But,
x+y=90.......(2) [Definition of complementary angles]
By eliminating (1) and (2) we get,
x=25 degrees..
Putting the value of x in eq.(2) we get ,
y=65 degrees..