First let’s say that the mean of population Y is 0. Its exact value won’t matter. Now let z be the common standard deviation of the two populations. By assumption it is also the mean of population X. Then any individual in population Y has a height with mean 0 and standard deviation z while any individual in population X has a height with mean z and standard deviation z.
So the probability that a given person in population Y is shorter than t is N(t/z) where N( ) is the standard cumulative normal distribution. Assuming that the heights are independent, the probability that everyone in population Y is shorter than t is [N(t/z)]^y.
Still assuming independence, the probability (density) that “Jim” is tallest person in population X and is exactly t is the probability that the x-1 others are shorter than t, [N((t-z)/z)]^(x-1), multiplied by the probability (density) that Jim is t, n((t-z)/z). Here n() is the sandard normal density function n(s) = exp(-s^2/2)/(2pi). Here we have to subtract z from t since t-z is the “distance” the height is from the mean of the X population. There are x different people in population X so the proabaility that the tallest person is t is x[N((t-z)/z)]^(x-1)*n((t-z)/z).
Assuming independence across the populations, the probability that the tallest person in X is t and no one in Y is taller is [N(t/z)]^yx[N((t-z)/z)]^(x-1)*n((t-z)/z). We now have to integrate this expression with respect to t from minus infinity to infinity.