Since we are given a point that lies on the line, the logical first step would be to plug that point in. If we plug that point in, we are left with no variables in the equation other than p. So:
[tex] 5*2+p*4=22 \implies\\
10+4p=22 \implies\\
4p=12 \implies\\
p=3 [/tex]