I've come across a problem in the books exercises (exercise 1.4-17b), that asks of me to justify whether or not the $ \phi$ holds for $((q \rightarrow (p  (q \rightarrow p))  (p \rightarrow q)) \rightarrow p$.Assuming that it doesn't hold, we would have to make the implication ${\tt F}$, that means the left-hand side must be ${\tt T}$ and $p$ would have to be ${\tt F}$.Now, the solution sheet says that it is indeed valid. However, while checking my solution against theirs, I found that I could produce a counter example when $p$ is ${\tt F}$ by the assumption, and $q$ is ${\tt F}$. This makes the entire left-hand side ${\tt T}$, and hence the implication ${\tt F}$, which proves that there exists a counter example  and hence that $\phi$ does not hold.I'd like to ask whether or not I am wrong, or if the solution is. Adding to that, I'm no hero at logic, so my conclusion is based on a vague idea of what is going on, but I find this discrepancy a bit confusing, because the same argument is used by themselves in a previous exercise solution.
Discrepancy of solution in Logic in Computer Science book, please verify
lo.logic