Starting with some gold coins and some empty treasure chests, I tried to put $$9$$ gold coins in each treasure chest, but that left $$2$$ treasure chests empty. So instead I put $$6$$ gold coins in each treasure chest, but then I had $$3$$ gold coins left over. How many gold coins did I have? ． 
Overseas Competition->Knowledge Point->Word Problem Modules->Equation Word Problems->Word Problems for Linear Equations with One Variable
Suppose $x$ is the number of treasure chests. Thus the number of gold coins can be represented as $$9(x-2)$$ or $$6x + 3$$. So, $$9(x-2)=6x+3$$, $$x=7$$. There are $$9\times (7-2)=45$$ gold coins. 