Now, look at the pics again

Now, the sum of all angle in a triangle is 180°. The angle in front of the tilted side is a right angle. So it took 90° all by it self. That left only 90° of angle to be divided between x and y.
Hence, x+y=90°.
That means
y=90°-x
Naturally
sin(x)=cos(90°-x)
cos(x)=sin(90°-x)
The same way but less importantly
sec(x)=cosec(y)=cosec(90°-x)
cosec(x)=sec(y)=sec(90°-x)
