I thought I was doing this right until I checked my answer online and got a different one. I worked through the problem again and got my original answer a second time so this one is bothering me since the other similar ones I have done checked out okay. Please let me know if I'm doing something wrong, thanks!
Find $x, y$ contained in integers such that $475x+2018y=1$ then find a value for $475\equiv -1$ (mod $2018$).
Since it is in the form of $ax+by=1$ I know that the $\gcd(a,b)=1$. I still did the division algorithm since that helps me with the back substitution. Here is what I got.
Division Algm:
$2018=(4\times 475)+118$
$475=(4\times 118)+3$
$18=(39\times 3)+1$
Back Sub:
$1=118-(39\times 3)$
$1=118-39(475-(4\times 118))$
$1=(157\times 118)-(39\times 475)$
$1=157\times (2018-(4\times 475))-(39\times 475)$
$1=(157\times 2018)-(667\times 475)$
So $x=667$ and $y=157$
The second question I answered from the first part which is $475x$ congruent to $1$(mod $2018$) so that would just be $667$ from the first part. Any help is appreciated, thanks!