Thank you for trying, but the answer was incorrect :( Here is the solution I got back in case it helps.
We approach this problem by trying to find solutions to the equation pq-4p-2q=2 . To do this, we can use Simon's Favorite Factoring Trick and add 8 to both sides to get qp-4p-2q+8=10. This can be factored into
(p-2)(q-4)=10
We now can see that there are solutions only if p-2 divides 10 . Thus, there are 4 possible values of p between 1 and 10 inclusive (1,3,4,7) . It follows that the probability of picking such a p is 2/5.
Thanks again!