Affine Cipher - Pair of plain to cipher text
After $3a=-1 \pmod{26}$ note that mod $26$ we have $-1 = 25=51=3\cdot 17$, so $a=17$. 

Alternatively, note that $3\cdot9=27=1$ so we can multiply both sides by $3^{-1}=9$ and $-9=17\pmod{26}$. 

And then $5\cdot17 +b = 9$, and $5\cdot 17=85=7$ and so $b=9$. 

Now substitute $p=3$ in the encryption formula $c=17p+9$ for the final question.