Find the relationship between $p$ and the number of solutions of this system, using the Kronecker - Capelli Theorem:
Solution 1:
When you get that $\det(A)=p^2+8p+7=(p+7)(p+1)$ you can argue that:
If $p\ne -1,-7$ then $rn(A)=3$, so $rn(A|B)=3$ (since $A$ is a 3x3 minor) and you have unique solution.
There are only 2 values of $p$ for which yo do NOT know $rn(A)$.
So, you can study these 2 particular cases (namely $p=-7$ and $p=-1$). There is no need of study the range of $A|B$ with the parameter $p$.
Observe that in $A$ you allways have a 2x2 nonzero minor, so $rn(A)=2$ if $p=-7,-1$.