Clearly $d > 2$.
$d.2^{d-1} = (x-1)(x+1)$ hence there exists an odd divisor $p$ of $d$ such that $x - 1 = 2p$ and $x+1 = 2^{d-2}\frac{d}{p}$.