We need to solve this :
(p^2 / 2 ) * (p/2)^(n -1) = p^9 / 256 where n is the nth term
Multiply through by 2 / p^2
(p / 2)^(n -1) = p^7 / 128
Note p^7 / 128 = p^7 / 2^7 = ( p / 2)^7
So......
(p / 2) ^(n - 1) = (p /2 )^7
Since the bases are the same, solve for the exponents
n - 1 = 7 add 1 to both sides
n = 8 terms