[tex]\huge\sf\color{red}{Answer:}[/tex]
My Solution:
The value of p is [tex]\large\sf\color{red}{39}[/tex]
Hope it helps : )