I am doing a question from a Number Theory Booklet provided by Boston University. The question is pasted here:
You need to cross a bridge guarded by a troll. He will let you pass if you put exactly one gold coin in his tray. You have a bag with infinite gold coins (wow, lucky you!), and two scoops. One scoop picks up 12 coins, the other scoop picks up 5 coins. So each time you can add 5 or 12 coins to the tray, or return 5 or 12 coins to your bag. Can you cross the bridge?
I have deduced that I need to solve over the integers for $5x + 12y = 1,$ where $x$ and $y$ are the number of scoops. By guess and check, I saw that the number of scoops of $12$ are in the form 5$n + 3.$ I need help proving this though.
Some of the working sets of $(x,y)$ are $(-19,8), (-31,13),$ and $(-43,18).$
$$8 = 5(1) + 3, 13 = 5(2) + 3, 18 = 5(3) + 3$$
I'm a 15 year old high school student with some very rudimentary understanding of number theory. Thank you for your help.