I can't solve the following problem:
Find $n$, $d$ and $q$ that satisfies that:
The division of $n+5$ and $d$ (I mean $(n+5)/d$) produces a quotient of $q$ and a remainder of $2$.
The division of $4n-4$ and $d+1$ produces a quotient of $2q+2$ and a remainder of $2d-6$.
$n + 5 = dq + 2$
$4n-4 = (d+1)(2q+2) + 2d - 6$
Can you solve those? 2 equations three unknowns?
$n = dq - 3$
$4dq - 12 - 4 = 2dq + 2q + 2d + 2 + 2d - 6$
$4dq - 16 = 2dq + 2q + 4d -4$
$2dq = 2q+ 4d +12$
$dq = q + 2d + 6$
$(d-1)q =2d + 6$
$q = (2d + 6)/(d-1) = (2d -2)/(d-1) + 8/(d-1) = 2 + \frac 8{d-1}$
Note all are positive integers and the remainders is less than the divisor and more than $0$.
So $2<d$ and $2d-6 < d$ so $d < 6$. So $d-1|8$ so the only options are $d =3$ or $d = 5$. But if $d=3$ then $2d - 6 = 0$. So $d =5$
So $q = 4$ and $n= 17$
And check: $\frac {17+5}5 = 4 R 2$ check
and $\frac {4*17 - 4}{6} = \frac {64}6 = 10 R 4 = (2*4 + 2) R (2*5 - 6)$