Artificial intelligent assistant

Simple system of linear congruence I'm very novice on congruences so please don't scold me too much :) So I have a system of equations like this: $$\begin{cases}23d\equiv 1 \pmod{40}\\\ 73d\equiv 1 \pmod{102} \end{cases}$$ And so from (1) I get $d=40k+7$. I plug it into (2) and I have $73(40k+7)\equiv 1 \pmod{102} \rightarrow 64k\equiv -6 \pmod{102}$. That means $k = 51 n+27$, so plugging back to the first, we have $d=2040n+1087$ which means that any $d\equiv 1087 \pmod{2040}$ satisfies the system of equations here which is not true since 7 doesn't satisfy it while it does satisfy both of our equations. How can I do it, then? Can I just see that $d=40k+7$ from the first and $d=102k+7$ from the second and just calculate $\begin{cases}d=40k+7 \\\ d=102k+7 \end{cases}$ which is 7? Can I then be sure it's the only solution?

There is an error in your arithmetic:

$$73*7 = 511 = 5*102 + 1$$

Thus when you substitute in $d = 40k + 7$ you should get $64k \equiv 0 \pmod{102}$ instead of $\equiv -6$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4e4aa8acd9e658c6fcc970570b152af8