We consider three cases depending on the value of p.
Case 1. p≡1(mod4).
Picking t=2 works. Since x2 and y2p−1 are perfect squares, their difference cannot be 2.
Case 2. p≡3(mod4) and p>7.
Note that y2p−1≡−1,0 or 1(modp). Thus, it suffices to show that there exists t such that t−1,t,t+1 are quadratic nonresidues modulo p. To this end, note that the squares 1,25,49 form an arithmetic progression with common difference 24. Let c be the inverse of 24 modulo p, then
c+1≡c(1+24)≡25c(modp),c+2≡c(1+48)≡49c(modp),
which implies (pc)=(pc+1)=(pc+2). So when (pc)=−1, picking t≡c+1(modp) works.
On the other hand, when (pc)=1, then since p≡3(mod4) we have (p−1)=−1, so picking t≡−c−1(modp) works.
Case 3. p=7. We will show that t=7 works, i.e. that the equation
x2=y3+7
has no integer solution. Suppose the contrary. If y is even, then x2≡3(mod4), which is impossible. Thus y is odd. Write the equation as x2+1=(y+2)(y2−2y+4), and note that y2−2y+4=(y−1)2+3≡3(mod4). So there exists a prime q≡3(mod4) such that q∣y2−2y+4.
However, since q∣y2−2y+4, so q∣x2+1, and thus (q−1)=1, which contradicts with q≡3(mod4). Therefore the equation has no integer solutions.