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. 
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? ． 
Options:
a) $$9$$ 
b) $$27$$ 
c) $$45$$ 
d) $$63$$ 
e) $$81$$ 