Suppose I have the equation $B = \frac{8A - 29}{27}$, where $A$ and $B$ are integers. Then $27B = 8A - 29$, and so we have the linear Diophantine equation $8A - 27B = 29$.
Using the extended Euclidean algorithm we get $A = -290 + 27n$ and $B = -87 + 8n$.
Now, I can see that plugging the $A$ and $B$ directly into our original $B(A)$, we get $0=0$.
However, the author states that the solution to the problem is of the form $7 \mod 27$.
How can I see that the solution to the problem is of the form $7 \mod 27$?
$A = \dfrac{27B+29}{8} = 3B+4 + \dfrac{3(B-1)}{8} \Rightarrow 8 \mid B-1 \Rightarrow B-1 = 8n \Rightarrow B = 8n+1 \Rightarrow A = 3(8n+1)+4+3n = 27n+7$. Check: $8A-27B = 8(27n+7) - 27(8n+1) = 56-27 = 29$.