First step is to always find the determinant of the coefficient matrix:
=15-4p)
When

, there is a unique solution (since the inverse exists)
When

, there is either no solution OR infinitely many solutions.
We can't go any further with the determinant, so the next thing to do is manually plug in

and see what happens.

Now notice that the following ratios are equal

(this will
always be the case when the determinant is zero and all coefficients are non-zero). What this means is, if you multiply equation 1 by a factor of

, the left hand side will look the same as equation 2:

From here, it becomes trivial. There are infinite solutions if

, and there are no solutions if

.
_____________________
Consider another example:

Then,
=p+p^2)
Unique solution if

, infinite or no solution if

. Now, when

you can simply do what we did before to find the appropriate values of

:

In this case the LHSs are already equal, so

infinite solutions,

no solutions.
However, when

, the LHS of the bottom equation becomes 0:

This is actually simpler than before, now you only need to look at the bottom equation. If

, there are infinite solutions, and if

there are no solutions.