Applying Euclid's division lemma to 30 and 72
Since 72>30
72=30×2+12 ....... (1)
30=12×2+6 ...... (2)
12=6×2+0 ...... (3)
The remainder has now become zero,
Since the divisor at this stage is 6
The HCF of 30 and 72 is 6
Now from (2), we have
30=12×2+6
Rearrange this
6=30−12×2
⇒6=30−[(72−30×2)×2] { from ( 1 ) }
⇒6=30−72×2+4×30 [ using distributive property ]
⇒6=30×(5)+72×(−2) ...... (4)
According to the problem,
d=30x+72y ........ (5)
Comparing (4) and (5), we get
x=5 and y=−2