Can you be more specific about why you are having difficulty with setting up the axes? The axes are shown in the figures in posts 23, 38, and 40 of this thread.
The submerged planar surface lies in a plane. The x-y coordinate system is chosen such that the submerged planar surface lies in the x-y plane of the coordinate system with the x-axis running along the surface of the water. You can choose the origin of the coordinate system arbitrarily as long as the the previously stated conditions are met. Note that if the planar surface is tilted with respect to the vertical, then the x-y coordinate plane will also be tilted.
In your problem, you are concerned with each of the rectangular sides of the trough. They are tilted at a 45 degree angle to the vertical.
Consider a rectangle that is initially oriented vertically and submerged in water until the surface of the water is at the top edge of the rectangle, as shown in the attachment below. The figure on the left shows a particular choice of the x and y axes where the y-axis passes through the center of the rectangle. The right figure shows the y-axis shifted arbitrarily to the left. Either choice of position of the y-axis is OK.
Now imagine rotating the vertical rectangle about the x-axis so that it is no longer vertical. You would also rotate the x-y plane of the coordinate system so that the x-y plane still contains the rectangle. That is, the x-y plane and the rectangle are both tilted the same relative to the vertical.
You might find this video helpful: