Denote by $d$ the diagonal of the base. There is a orthogonal triangle with edges $d/2$, $x$ and $y$, so by the Pythagorean theorem $$ y^2 = x^2 + \frac 14d^2 $$ that is $$ d^2 = 4(y^2 - x^2) \iff d = 2\sqrt{y^2 - x^2}. $$ Now the sidelength $a$ of the base is given by $a = d/\sqrt 2$ (again by Pythagoras), so $$ a = \frac d{\sqrt 2} = \sqrt 2 \cdot \sqrt{y^2 - x^2} $$ So the area $A$ of the base is $$ A = a^2 = 2 \cdot (y^2 - x^2) $$ and hence the volume $$ V = \frac 13 A \cdot x = \frac 23 \cdot (y^2 - x^2). $$