Determine all prime numbers $p$ such that $p^2 - 6$ and $p^2 + 6$ are both prime numbers.
1. We need to find all prime numbers \( p \) such that both \( p^2 - 6 \) and \( p^2 + 6 \) are prime numbers.
2. First, let's test small prime numbers:
   - For \( p = 2 \):
     \[
     p^2 - 6 = 2^2 - 6 = 4 - 6 = -2 \quad (\text{not a prime number})
     \]
     \[
     p^2 + 6 = 2^2 + 6 = 4 + 6 = 10 \quad (\text{not a prime number})
     \]
   - For \( p = 3 \):
     \[
     p^2 - 6 = 3^2 - 6 = 9 - 6 = 3 \quad (\text{prime number})
     \]
     \[
     p^2 + 6 = 3^2 + 6 = 9 + 6 = 15 \quad (\text{not a prime number})
     \]
   - For \( p = 5 \):
     \[
     p^2 - 6 = 5^2 - 6 = 25 - 6 = 19 \quad (\text{prime number})
     \]
     \[
     p^2 + 6 = 5^2 + 6 = 25 + 6 = 31 \quad (\text{prime number})
     \]
     So, \( p = 5 \) works.

3. Now, let's consider \( p > 5 \). For any prime \( p > 5 \), we know that \( p \) must be of the form \( 6k \pm 1 \) (since all primes greater than 3 are of this form).
4. We will use modular arithmetic to show that no other primes \( p > 5 \) can satisfy the condition.
   - For \( p > 5 \), \( p \equiv \pm 1 \pmod{6} \).
   - Consider \( p \equiv 1 \pmod{6} \):
     \[
     p^2 \equiv 1^2 \equiv 1 \pmod{6}
     \]
     \[
     p^2 - 6 \equiv 1 - 6 \equiv -5 \equiv 1 \pmod{6}
     \]
     \[
     p^2 + 6 \equiv 1 + 6 \equiv 7 \equiv 1 \pmod{6}
     \]
     Both \( p^2 - 6 \) and \( p^2 + 6 \) are congruent to 1 modulo 6, which does not help us directly. We need to consider modulo 5.
   - For \( p > 5 \), \( p \equiv \pm 1 \pmod{5} \):
     \[
     p^2 \equiv 1 \pmod{5}
     \]
     \[
     p^2 - 6 \equiv 1 - 6 \equiv -5 \equiv 0 \pmod{5}
     \]
     \[
     p^2 + 6 \equiv 1 + 6 \equiv 7 \equiv 2 \pmod{5}
     \]
     Since \( p^2 - 6 \equiv 0 \pmod{5} \), \( p^2 - 6 \) is divisible by 5. For \( p^2 - 6 \) to be prime, it must be equal to 5. However, this is not possible for \( p > 5 \).

Therefore, the only prime number \( p \) such that both \( p^2 - 6 \) and \( p^2 + 6 \) are prime numbers is \( p = 5 \).

The final answer is \( \boxed{ p = 5 } \).