In the first case, the two have the same phase. The simplest answer is that they might be at the same value of x: the same position in the direction of the wave. This often happens. Two surfers sit side by side at what they judge is the best value of x to pick up the next good wave. (They would have different values of z, the horizontal displacement at right angles to x, but the same x and y.) They might also be 1, 2, 3 or n wavelengths apart in the x direction.
If they differ in phase by π then they might be separated in the x direction by λ/2, like the first and third surfers in the animation at right. Or the second and fourth, etc. Alternativly, their x separation might be 3λ/2, like the first and first and seventh.
In the third case (bottom pair at left), we first should ask who is ahead in phase? We notice that the one on the right arrives at the maximum y one quarter of a period before the one on the left. So we could say that the one on the right is one quarter of a cycle or π/2 radians ahead in phase. (Or alternatively 5π/2 or 9π/2 ahead, or 3π/2 behind in phase, etc.) In the animation at right, the first and fourth surfers satisfy this, at Δx = 3λ/4. Which other pairs also satisfy the condition?