To identify the opposite and adjacent of any angle is fairly simple
the adjacent is the part of the angle that connects with the hypotenuse to form the angle. So in the 1st triangle the hypotenuse along with segment XZ forms angle Z. That means that XZ is the adjacent.
To identify the opposite, you find the segment that connects the adjacent to the hypotenuse.
SO in the 1st triangle, segment XY connects the adjacent XZ with the hypotenuse. So that means that XY is the opposite of angle Z.