Solve for integers, $x, y$

$4258x+147y=369 \implies 4258x \equiv 369 \pmod{147}$

I got this question from SE, but I want to try **this approach.**

I suppose we will find the inverse modulus of $4258 \pmod{147}$ using Euclid's algorithm. So:

$4258 = 28(147) + 142$

$147 = 1(142) + 5$

$142 = 28(5) + 2$

$5 = 2(2) + 1 \implies 1 = 5 - 2(2)$

$$1 = 5 - 2\bigg( 142 - 28(5) \bigg) = 5 - 284 + 2(28(5))$$

$$= 5 - 284 + 2\bigg( 28\cdot (147 - 142) \bigg)$$

$$= 5 - 284 + 2\bigg( 28\cdot(147 - 4258 + 28(147)) \bigg)$$

I still dont understand this.

But I am lost in this algorithm, how should I compute further?