I know that Pell's equation $x^2-dy^2=1$ always has solutions and I want using that fact show that $x^2-dy^2=4$ also always has solutions.
As Batominovski indicated in comments, if you know a solution $(x,y)$ to $x^2-dy^2=1$,
then $(X,Y)=(2x,2y)$ is a solution to $X^2-dY^2=4$,
because $X^2-dY^2=(2x)^2-d(2y)^2=4x^2-d4y^2=4(x^2-dy^2)=4(1)=4.$
For example, solutions to $x^2-5y^2=1$ are $(x,y)=(1,0), (9,4), (161,72), ...$,
so solutions to $X^2-5Y^2=4$ are $(X,Y)=(2,0), (18,8), (322, 144), ...$.
So this shows that $X^2-5Y^2=4$ has solutions, though there are solutions this does not find,
such as $(X,Y)=(3,1),(7,3),(47,21),(123,55),(843,377), ...$.
Claim
$ax + by = c$ has infinite number of positive solution if and only if $a$ and $b$ are of opposite signs and $\gcd(a,b)|c$
Proof
WLOG let $a>0$ and $b<0$. There exists a solution because $\gcd(a,b)|c$.
If $(x',y')$ is a solution then $(x'-b,y'+a)$ is a solution so we get a increasing ordered pair of $(x,y)$ that satisfies the equation. Hence there are infinite number of positive solutions for this case.
It is not possible if $a$ and $b$ are of same sign. Suppose there are infinitely many solution when $a$ and $b$ are of same sign then there exists a solution $(x',y')$ with $\mid x'\mid>c$ and $\mid y'\mid>c$ , but this implies $\mid ax'+by'\mid>c$ thus leading to a contradiction.
For example $(a,b,c)=(rt,-rt,2rt)$ where $r$ is a constant and $t$ is a integer variable will give you different values for $a,b,c$ such that the equation has infinitely many solutions.
Best Answer
Pell's equation $x^2 - d y^2 = 1$ always has a fundamental solution $(x_0, y_0)$ (solution with smallest $x > 1$). All other solutions can be expressed: $$ x_n - y_n \sqrt{d} = (x_0 - y_0 \sqrt{d})^n $$ It so happens that if you define the norm in the ring $\mathbb{Z}(\sqrt{d}) = \{a + b \sqrt{d} \colon a, b \in \mathbb{Z}\}$ by: $$ N(a + b \sqrt{d}) = a^2 - b^2 d $$ then if you define the conjugate of $z = x + y \sqrt{d}$ by $\overline{z} = x - y \sqrt{d}$ you have: $$ N(z) = N(\overline{z}) = z \cdot \overline{z} $$ Also, since $\overline{u \cdot v} = \overline{u} \cdot \overline{v}$, it is also: $$ N(u \cdot v) = (u \cdot v) \cdot (\overline{u \cdot v}) = (u \cdot \overline{u}) \cdot (v \cdot \overline{v}) = N(u) \cdot N(v) $$ Your given solution is $N(r - s \sqrt{d}) = c$, and we have $N(x_0 - y_0 \sqrt{d}) = 1$: $$ N((r - s \sqrt{d}) \cdot (x_0 - y_0 \sqrt{d})^{\pm n}) = N(r - s \sqrt{d}) \cdot \left(N(x_0 - y_0 \sqrt{d})\right)^{\pm n} = c $$ I.e., $(r - s \sqrt{d}) \cdot (x_0 - y_0 \sqrt{d})^n$ defines a solution for all $n \in \mathbb{Z}$.