Thought it possible to simplify in order to be able to write the solutions of the equation. For this we use the decomposition of the number $c$ on the multipliers.
$$Z^2-dR^2=c=ab$$
To record decisions have to know first the solution of the Pell equation $(Z_1;R_1)$.
And solving the following equation Pell $(k_0;n_0)$.
$$k^2-dn^2=1$$
Then the formula is as follows.
$$Z_2=k_0Z_1+dn_0R_1$$
$$R_2=n_0Z_1+k_0R_1$$
The problem in finding the first solution for General Pell equation $(Z_1;R_1)$.
The meaning of the solution is that to factor the number. $c=ab$
Then degradable factoring the difference. $xy=a-b$
If the following expression may be a square.
$$s^2=\frac{1}{d}((\frac{y+x}{2})^2-a)$$
Then the first solution is written simply.
$$Z_1=ds^2+\frac{y^2-x^2}{4}$$
$$R_1=ys$$
Such record these formulas will greatly simplify the calculations. Always better to have a formula.