$a)$ Let $p$ and $q$ be distinct prime numbers such that $p+q^2$ divides $p^2+q$. Prove that $p+q^2$ divides $pq-1$.
$b)$ Find all prime numbers $p$ such that $p+121$ divides $p^2+11$.
### Part (a)

1. Given that \( p \) and \( q \) are distinct prime numbers such that \( p + q^2 \) divides \( p^2 + q \), we need to prove that \( p + q^2 \) divides \( pq - 1 \).

2. Since \( p + q^2 \) divides \( p^2 + q \), we can write:
   \[
   p^2 + q \equiv 0 \pmod{p + q^2}
   \]
   This implies:
   \[
   p^2 + q \equiv 0 \pmod{p + q^2}
   \]

3. We also know that:
   \[
   p^2 + q^2p \equiv 0 \pmod{p + q^2}
   \]
   because \( p + q^2 \) divides \( p^2 + q^2p \).

4. Subtracting the two congruences, we get:
   \[
   (p^2 + q^2p) - (p^2 + q) \equiv 0 \pmod{p + q^2}
   \]
   Simplifying, we have:
   \[
   q^2p - q \equiv 0 \pmod{p + q^2}
   \]
   Factoring out \( q \), we get:
   \[
   q(qp - 1) \equiv 0 \pmod{p + q^2}
   \]

5. Since \( p \) and \( q \) are distinct primes, \( q \) and \( p + q^2 \) are coprime. Therefore, \( p + q^2 \) must divide \( qp - 1 \).

6. Hence, we have shown that:
   \[
   p + q^2 \mid pq - 1
   \]

### Part (b)

1. We need to find all prime numbers \( p \) such that \( p + 121 \) divides \( p^2 + 11 \).

2. Given \( p + 121 \mid p^2 + 11 \), we can write:
   \[
   p^2 + 11 \equiv 0 \pmod{p + 121}
   \]
   This implies:
   \[
   p^2 + 11 \equiv 0 \pmod{p + 121}
   \]

3. We also know that:
   \[
   p + 121 \mid p^2 - 121^2
   \]
   because \( p + 121 \) divides \( p^2 - 121^2 \).

4. Therefore, we have:
   \[
   p + 121 \mid (p^2 - 121^2) - (p^2 + 11)
   \]
   Simplifying, we get:
   \[
   p + 121 \mid -121^2 - 11
   \]
   which simplifies to:
   \[
   p + 121 \mid 121^2 + 11
   \]

5. Calculating \( 121^2 + 11 \):
   \[
   121^2 = 14641
   \]
   \[
   14641 + 11 = 14652
   \]

6. Therefore, \( p + 121 \) must be a divisor of \( 14652 \). The prime factorization of \( 14652 \) is:
   \[
   14652 = 2^2 \cdot 3 \cdot 11 \cdot 111
   \]

7. The divisors of \( 14652 \) are:
   \[
   \{1, 2, 3, 4, 6, 9, 12, 18, 36, 37, 74, 111, 148, 222, 333, 444, 666, 1332\}
   \]

8. Therefore, \( p + 121 \) must be one of these divisors. Subtracting 121 from each, we get possible values for \( p \):
   \[
   p \in \{101, 323, 1211\}
   \]

9. Checking each value:
   - For \( p = 101 \):
     \[
     101 + 121 = 222
     \]
     \[
     101^2 + 11 = 10212
     \]
     \[
     10212 \div 222 = 46
     \]
     So, \( p = 101 \) works.
   - For \( p = 323 \):
     \[
     323 + 121 = 444
     \]
     \[
     323^2 + 11 = 104420
     \]
     \[
     104420 \div 444 = 235
     \]
     So, \( p = 323 \) works.
   - For \( p = 1211 \):
     \[
     1211 + 121 = 1332
     \]
     \[
     1211^2 + 11 = 1466522
     \]
     \[
     1466522 \div 1332 = 1101
     \]
     So, \( p = 1211 \) works.

The final answer is \( \boxed{ p \in \{101, 323, 1211\} } \)