Let $p$ be a prime number. A rational number $x$, with $0 < x < 1$, is written in lowest terms. The rational number obtained from $x$ by adding $p$ to both the numerator and the denominator differs from $x$ by $1/p^2$. Determine all rational numbers $x$ with this property.
1. Let \( x = \frac{a}{b} \) where \( \gcd(a, b) = 1 \) and \( 0 < x < 1 \). The problem states that adding \( p \) to both the numerator and the denominator results in a rational number that differs from \( x \) by \( \frac{1}{p^2} \). Therefore, we have:
   \[
   \left| \frac{a + p}{b + p} - \frac{a}{b} \right| = \frac{1}{p^2}
   \]

2. We can rewrite the difference of the fractions as:
   \[
   \frac{a + p}{b + p} - \frac{a}{b} = \frac{(a + p)b - a(b + p)}{b(b + p)} = \frac{ab + pb - ab - ap}{b(b + p)} = \frac{pb - ap}{b(b + p)}
   \]

3. Simplifying the numerator, we get:
   \[
   \frac{pb - ap}{b(b + p)} = \frac{p(b - a)}{b(b + p)}
   \]

4. According to the problem, this difference is equal to \( \frac{1}{p^2} \):
   \[
   \frac{p(b - a)}{b(b + p)} = \frac{1}{p^2}
   \]

5. Cross-multiplying to clear the fractions, we obtain:
   \[
   p^3(b - a) = b(b + p)
   \]

6. Expanding and simplifying, we get:
   \[
   p^3b - p^3a = b^2 + bp
   \]

7. Rearranging terms, we have:
   \[
   p^3b - b^2 - bp = p^3a
   \]

8. Factoring out \( b \) on the left-hand side:
   \[
   b(p^3 - b - p) = p^3a
   \]

9. Since \( \gcd(a, b) = 1 \), \( b \) must divide \( p^3 \). The possible values for \( b \) are \( 1, p, p^2, p^3 \).

10. We test each possible value of \( b \):
    - If \( b = 1 \):
      \[
      1(p^3 - 1 - p) = p^3a \implies p^3 - p - 1 = p^3a \implies a = \frac{p^3 - p - 1}{p^3}
      \]
      Since \( a \) must be an integer, this is not possible.

    - If \( b = p \):
      \[
      p(p^3 - p - p) = p^3a \implies p(p^3 - 2p) = p^3a \implies p^4 - 2p^2 = p^3a \implies a = \frac{p^4 - 2p^2}{p^3} = p - \frac{2}{p}
      \]
      Since \( a \) must be an integer, this is not possible.

    - If \( b = p^2 \):
      \[
      p^2(p^3 - p^2 - p) = p^3a \implies p^2(p^3 - p^2 - p) = p^3a \implies p^5 - p^4 - p^3 = p^3a \implies a = \frac{p^5 - p^4 - p^3}{p^3} = p^2 - p - 1
      \]
      This is an integer, so \( a = p^2 - p - 1 \).

    - If \( b = p^3 \):
      \[
      p^3(p^3 - p^3 - p) = p^3a \implies p^3(-p) = p^3a \implies -p^4 = p^3a \implies a = -p
      \]
      Since \( a \) must be positive, this is not possible.

11. Therefore, the only solution is \( \frac{a}{b} = \frac{p^2 - p - 1}{p^2} \).

12. Additionally, for \( p = 2 \), we have the extra particular solution \( \frac{1}{2} \).

The final answer is \( \boxed{ \frac{p^2 - p - 1}{p^2} } \) and \( \frac{1}{2} \) for \( p = 2 \).