In order for these terms to be part of an arithmetic sequence, they should have a common difference - that is the difference between two consecutive terms are always the same. So:
2p - 1 - (5p + 12) = (5p + 12) - 7p - 2
9p + 1 = 2(5p + 12)
9p + 1 = 10p + 24
-23 = p
Therefore the answer is d.