You can see that there are 7 gold coins and 1 silver coin in one stack, and 11 silver coins and 1 gold coin in another stack, now, if we call the weight of 1 gold coin x and the weight of 1 silver coin y, we get:
Now, we can combine like terms:
And, we also know that 8 gold coins have the same weight as 12 silver coins, so we get:
Which gives us:
Now we have a system of equations:
Solve for x and y and you will have the weights of the gold and the silver coins.