The only solutions seem to be 3 and 7 but I can't prove that there are no others.
Context: Find every value for integer a, for which $x^2-(a+5)x+5a+1$ expression can be factored as $(x+b)(x+c)$ where b and c are integers.
$x=\frac{a+5 \pm \sqrt{(a-3)(a-7)}}{2}$
(In a pre-calc book, btw. Real solutions only (don't know if it matters))
I have no idea where to start, forgive me for not having any real attempts.
To answer your question: when can $(a-3)(a-7)$ be a perfect square?
Suppose $$(a-3)(a-7)=k^2, $$ for some integer $k$. Then $$a^2-10a+21-k^2=0.$$ This implies that $$a = \dfrac{10\pm\sqrt{100-4(21-k^2)}}{2},$$ implying that $$a = \dfrac{10\pm 2\sqrt{4+k^2}}{2}.$$ As $a$ has to be an integer, we look for values of $k$ for which$\sqrt{4+k^2}$ is a perfect square. This is quite easy as $$k^2+4 = m^2 \implies 4 = (m-k)(m+k).$$ Following are the possibilities now:
$(m-k, m+k)=(\pm1,\pm4); (m-k, m+k)=(\pm2,\pm2); (m-k,m+k)=(\pm4,\pm1)$.
The first and last cases can be easily discarded as the solutions to which are not integers. Thus, we are left with the option $(m-k, m+k) = (\pm2,\pm2)$. Solving this, we would get $m=\pm2$ and $k=0$. Thus $$(a-3)(a-7)=0,$$ implying that $a=3, 7$ are the only solutions.
$\textbf{Note.}$ I really did not notice the comment of Will Jagy in the comments which runs on the similar lines as that of this. I just noticed it after writing this answer.