The basic synthetic division algorithm only applies to quotients like this when the divisor (denominator) is a monic linear polynomial, meaning the coefficient of the leading term needs to be 1.
First write
[tex]\dfrac{2p^2+7p-39}{2p-7}=\dfrac12\times\dfrac{2p^2+7p-39}{p-\frac72}[/tex]
Now, carry out the synthetic division:
...... | 2 ....... 7 ...... -39
7/2 | ....... 7 ...... 49
----------------------------
...... | 2 ...... 14 ...... 10
So you have
[tex]\dfrac12\times\dfrac{2p^2+7p-39}{p-\frac72}=\dfrac12\left(2p+14+\dfrac{10}{p-\frac72}\right)=p+7+\dfrac{10}{2p-7}[/tex]