<s>[INST] Explanation of this step in a modular arithmetic problem 
The multiplicative inverse of $5$ is $7$, when using mod $34$.
  $$\begin{align*}
5\cdot x&=3\\[0.1in]
7\cdot 5\cdot x &=7\cdot 3\\[0.1in]
1\cdot x &=7\cdot 3\\[0.1in]
x&=21
\end{align*}$$

I don't understand this part:
$$\begin{align*}
7\cdot 5\cdot x &=7\cdot 3\\[0.1in]
1\cdot x &=7\cdot 3
\end{align*}$$
How is 7*5*x the same as 1*x?
 [/INST] Since $5x = 3 \pmod{34}$, you can multiply both sides of this equation by $7$ (the inverse of $5$ to obtain $7 \cdot 5x = 7 \cdot 3 \pmod{34}$. (The reason why this works is because $a=b \pmod{n}$ implies $ca = cb \pmod{n}$, and you should check this yourself if you haven't.)
Therefore since 
$$
7 \cdot 5 = 35 = 34 + 1 = 0 + 1 = 1 \pmod{34},
$$ 
we obtain 
$$
x = 1 \cdot x = 7 \cdot 5 \cdot x  = 7 \cdot 3 = 21 \pmod{34}.
$$
Hope that helps,
</s>