Let $A$ be an integral domain and $A[X,Y]$ the polynomial ring in two variables with coefficients in $A$. Let $m, n ∈ \mathbb Z_{≥1}$ be positive integers. Claim: the ideal $(X^m − Y^n)$ is prime in $A[X, Y ]$ iff $m$ and $n$ are coprime.
I got the following hint but I couldn't figure out how to proceed the proof. Please give me a more details hints.
"For the ”if” direction: Show that the map $ϕ : A[X, Y ] → A[T], f(X, Y ) → f(T^n, T^m)$ is a ring homomorphism, which factors over a ring homomorphism $\bar ϕ : A[X, Y ]/(X^m − Y^n) → A[T]$. Then show that $\bar \phi$ is injective."