Let $n$ be a positive integer which is not a square. Suppose that $x$, $y$ and $a$, $b$ are positive integers satisfying $$x^2 − ny^2 = \pm 1,$$ and $$a^2-nb^2=\pm 1,$$ where $n$ is greater than $1$ and is square-free. Assume that $x < a.$ Show that this implies $y < b$.
So my initial thought here was to take it case by case. First, I assume that $x^2-ny^2=1$ and $a^2-nb^2=1.$ From here, we get $$x^2-ny^2=a^2-nb^2,$$ that is $$x^2-a^2=ny^2-nb^2,$$ so $$(x-a)(x+a)=n((y-b)(y+b)).$$ Now, $x<a$ so that means the expression on the left hand side is negative. Then, in order to maintain the equality on the right hand side it follows that $y-b<0$, that is $y<b.$
The case where they both equal $-1$ is very similar to the one above.
But I get a bit stumped when we consider the cross cases, that is, one of $x^2-ny^2=-1$ and $a^2-nb^2=1.$
Any help would be appreciated.
You have $a^2-x^2=n(b^2-y^2)+t$ where $t\in\{0,2,-2\}$. You know $a^2-x^2>0$. But the nearest two positive squares can be is when you have $1^2$ and $2^2$, when $2^2-1^2=3$. More formally $a\ge x+1$, so $a^2-x^2\ge 2x+1\ge3$ as $x\ge1$. Therefore $a^2-x^2-t\ge3-2=1>0$. Then you must have $b^2-y^2>0$.