Elementary number theory equation simplification Let $x\equiv 1 \pmod 3$ and $x\equiv 2 \pmod 5$
first congruence gives $x=1+3k$, substituting this second congruence we get 
$1+3k \equiv 2 \pmod 5$...(I), consequently $k \equiv 2 \pmod 5$...(II)
can someone tell how we reach from (I) to (II) ? which rules are applied? 

$$3k\equiv 1\equiv 6\pmod{5}\stackrel{:3}\iff k\equiv 2\pmod{5}$$
Or apply Extended Euclidean Algorithm to find $s,t\in\mathbb Z$ such that $3s+5t=1$, in which case $3s\equiv 1\pmod{5}$, so $k\equiv s\pmod{5}$.
Subtract consecutive equations:
$$5=3(0)+5(1)\\3=3(1)+5(0)\\2=3(-1)+5(1)\\1=3(2)+5(-1)$$
Therefore $3(2)\equiv 1\pmod{5}$, so $k\equiv 2\pmod{5}$.
