X= 70 degrees
Y= 70 degrees
Understand that every triangle has three angles and they add up to 180 degrees.
If I split this triangle in half the total degrees of each individual piece will be 90 degrees. A split in the isosceles triangle will also cause the 40 degrees to halved (thus, how I got 20 degrees in our 90 triangle).
Since we are dealing with an isosceles triangles two of the sides will be equal (hence, the dashes on the triangles sides). Therefore, x and y will also be equal.
Now if our 40 degreed angle is now 20 degrees, we have an unknown angle and the triangle in total now adds up to 90 degrees we can set up an equation.
20 + y = 90
Y = 70
Since X and Y are equal, X will also be 70.
If we return to to the isosceles triangle before it was split (use your photo for reference) and we add 40 +70 + 70 we will get 180 degrees. Which is the standard total of degrees for any triangle that is not a 90 degreed triangle.
I hope this helps. Feel free to ask questions.
Below I uploaded my work.