
In the given expression the base value of the expression are same,
The genral form of base and exponent are given as :

From the properties of base value,
If the base is same then the exponents value will add up,

Since, we have

So, the value of p is 29.
Answer : p = 29