Building on the previous answer
40 degrees in the lower triangle scribes out the same arc as 'y' in the upper trinagle ...so y= 40 degrees
45 degree angle in upper triangle scribes out the samme arc as x in the lower trinagle so they are the same x = 45 degrees