<s>[INST] Find all prime numbers p such that both numbers $4p^2+1$ and $6p^2+1$ are prime numbers? I tried $p$ for $2, 3$ and $5$ and they are not primes for both cases. How can I find all these prime numbers that satisfy those conditions? 
 [/INST] You might want to double-check your numbers: $4 \times 5^2 + 1 = 4 \times 25 + 1 = 101$, which is prime, and $6 \times 5^2 + 1 = 6 \times 25 + 1 = 151$, which is also prime.
But you're right about $2$ and $3$: $4 \times 2^2 + 1 = 17$, which is prime, but $6 \times 2^2 + 1 = 25$ which is obviously composite; and $4 \times 3^2 + 1 = 37$, which is prime, but $6 \times 3^2 + 1 = 55$, which is also composite.
Maybe if $p \neq 5$ then either $5 \mid (4p^2 + 1)$ or $5 \mid (6p^2 + 1)$? Well, if $p$ is a prime other than $5$, then $p \equiv 2, 3 \textrm{ or } 4 \pmod 5$. If $p \equiv 4 \pmod 5$ then $p^2 \equiv 1 \pmod 5$ and $4p^2 + 1 \equiv 0 \pmod 5$. But if $p \equiv 2 \textrm{ or } 3 \pmod 5$, then $p^2 \equiv 4 \pmod 5$ and $6p^2 + 1 \equiv 0 \pmod 5$.
Ergo, no other prime can satisfy both conditions.
</s>