The total angle between the mirror andthe normal is 90 degrees. If the angle between the mirror and the incident ray is 40 degrees, then the angle between incident ray and the normal, ie, the angle of incidence is (90 - 40) degrees = 50 degrees.
Angle of reflection = angle of incidence
So,
Angle of reflection = 50 degrees