Determine all solutions of 
\[ x + y^2 = p^m \]
\[ x^2 + y = p^n \]
For $x,y,m,n$ positive integers and $p$ being a prime.
We are given the system of equations:
\[ x + y^2 = p^m \]
\[ x^2 + y = p^n \]
where \(x, y, m, n\) are positive integers and \(p\) is a prime number. We need to find all possible solutions.

1. **Case 1: \(x = y\)**

   If \(x = y\), substituting \(y\) for \(x\) in the first equation, we get:
   \[ x + x^2 = p^m \]
   Substituting \(y\) for \(x\) in the second equation, we get:
   \[ x^2 + x = p^n \]
   
   Since both expressions are equal to \(p^m\) and \(p^n\) respectively, we have:
   \[ x + x^2 = p^m = p^n \]
   
   Since \( \gcd(x, x+1) = 1 \), the only way for \(x(x+1)\) to be a power of a prime is if \(x = 1\) and \(x+1 = 2\). Thus, \(x = 1\) and \(p = 2\). This gives:
   \[ 1 + 1^2 = 2 = 2^1 \]
   \[ 1^2 + 1 = 2 = 2^1 \]
   
   Therefore, the solution in this case is:
   \[ (x, y, p, m, n) = (1, 1, 2, 1, 1) \]

2. **Case 2: \(x > y\)**

   Assume \(\gcd(x, y) \neq 1\). Let \(\gcd(x, y) = p^k\) with \(k, a, b \in \mathbb{N}\) such that \(x = p^k a\) and \(y = p^k b\). Substituting these into the equations, we get:
   \[ p^k a + p^{2k} b^2 = p^m \]
   \[ p^{2k} a^2 + p^k b = p^n \]
   
   Since \(m, n > k\), we must have \(p \mid a\) and \(p \mid b\). This leads to a contradiction because \(a\) and \(b\) should be coprime. Therefore, \(\gcd(x, y) = 1\).

   Next, we analyze the inequalities:
   \[ (x + y^2) \mid (x^2 + y) \]
   \[ x^2 + y > x + y^2 \]
   \[ p^n > p^m \]
   
   Hence, \(p^m \mid p^n\), which implies:
   \[ x + y^2 \mid x^2 + y \]
   \[ x^2 + y \mid y^4 + y \]
   \[ p^m \mid (y + 1)(y^2 - y + 1) \]
   
   Notice that \(\gcd(y + 1, y^2 - y + 1) = 1\) or \(3\). If \(\gcd(y + 1, y^2 - y + 1) = 1\), then:
   \[ p^m \mid y + 1 \]
   \[ x + y^2 \leq y + 1 \]
   or
   \[ p^m \mid y^2 - y + 1 \]
   \[ x + y^2 \leq y^2 - y + 1 \]
   
   Both possibilities lead to contradictions. Therefore, \(\gcd(y + 1, y^2 - y + 1) = 3\), implying \(p = 3\). From the equation:
   \[ 3^{m-2} \mid \left(\frac{y + 1}{3}\right) \left(\frac{y^2 - y + 1}{3}\right) \]
   
   Since \(\gcd\left(\frac{y + 1}{3}, \frac{y^2 - y + 1}{3}\right) = 1\), we have:
   \[ 3^{m-2} \mid \frac{y + 1}{3} \]
   \[ 3^{m-1} \mid y + 1 \]
   or
   \[ 3^{m-2} \mid \frac{y^2 - y + 1}{3} \]
   \[ 3^{m-1} \mid y^2 - y + 1 \]
   
   By size reasoning, \(3^{m-1} \mid y^2 - y + 1\). Since \(y^2 - y + 1\) is odd and \(y^2 - y + 1 < x + y^2 = 3^m\), we have \(y^2 - y + 1 = 3^{n-1}\). This gives:
   \[ y^3 + 1 = 3^{n-1}(y + 1) \]
   
   For \(y \leq 2\), the only solution is \((x, y, p, m, n) = (5, 2, 3, 2, 3)\). For \(y \geq 3\), notice that \(3 \mid y + 1\). By Zsigmondy's theorem, there exists a prime \(p\) such that \(p \mid y^3 + 1\) and \(p \nmid y + 1\), which implies \(p \mid 3^{n-1}(y + 1)\). This leads to a contradiction. Therefore, the only solution for this case is \((x, y, p, m, n) = (5, 2, 3, 2, 3)\).

Combining both cases, the only solutions are:
\[ (x, y, p, m, n) = (1, 1, 2, 1, 1), (5, 2, 3, 2, 3), (2, 5, 3, 3, 2) \]

The final answer is \( \boxed{ (x, y, p, m, n) = (1, 1, 2, 1, 1), (5, 2, 3, 2, 3), (2, 5, 3, 3, 2) } \)