Solve the following simple congruence 

$$560x \equiv 1 \pmod{429}$$


I am close, I used Euclid's algorithm but the remainder is hard to go backwards.
$$560 = 1(429) + 131
$$
$$429 = 3(131) + 36$$
$$131 = 3(36) + 23$$
$$36 = 1(23) + 13$$
$$23 = 1(13) + 10$$
$$13 = 1(10) + 3$$
$$10 = 3(3) + 1$$
Working backwards anyway,
$1 = 10 - 3(13 - 1(23 - 1(13)))$
then,
$$1 = 10 - 3(13 - 1(23 - 1(36 - 1(131 - 3(429 - 3(560 - 429))))))$$
yikes. 
What should I do now?
 A: Your identity doesn't help you much with this problem. You need to iteratively plug in the equations into each other.
The last equation yields 1 = 10 - 3 * 3, the equation before that one yields 3 = 13-10. Now you can plug in the sixth equation into the last: 
1 = 10 - 3 * 3 = 10 - 3*(13 - 10) = 4 * 10 - 3 * 13
Now you know from the fifth equation that 10 = 23 - 13, so you can again plug it in:
1 = 4 * 10 - 3 * 13 = 4 * (23 - 13) - 3 * 13 = 4 * 23 - 7 * 13
When you continue this iteration you will end with an equation in the form of 1 = a * 560 + b * 429. Then a is the inverse of 560 modulo 429.
A: There are several implementations of the Extended Euclidean Algorithm that can help with the bookkeeping.  This answer describes one.  Here it is applied to your question:
$$
\begin{array}{r}
&&1&3&3&1&1&1&3&3\\\hline
1&0&1&-3&10&-13&23&-36&131&-429\\
0&1&-1&4&-13&17&-30&47&-171&560\\
560&429&131&36&23&13&10&3&1&0\\
\end{array}
$$
The next to the last column says that we have
$$
(131)560+(-171)429=1
$$
This means that $-171\equiv389\pmod{560}$ is the inverse of $429$ mod $560$.
Note how the numbers above the horizontal line are the same as the quotients in the divisions made in the simple Euclidean Algorithm.  This is because, we are performing the same operations, but keeping track of the information in a way that ends up giving the linear combination for the GCD.
A: You can work successively as follows:
$$131=560-429$$
$$36=429-3\times 131=429-3\times(560-429)=4\times 429-3\times 560$$
$$23=131-3\times 36=(560-429)-3\times (4\times 429-3\times 560)=10\times 560-13\times 429$$
Each remainder is expressed in terms of $560$ and $429$ until you get $1$ expressed in that form.
