Mary spent 3/7 of her money on a bag. The difference between the amount spent and not used was 12 dollars. How much did Mary spent on the bag?

she spent 36 dollars on the bag!

Let's say that x represents the total amount of money she has.
12 (difference) = 4/7x (not used) - 3/7x (the money spent on the bag)
12 = 1/7x
x = 84 <-- This is the total amount of money she had

Since she only spent 3/7 of her total amount, and 3/7 x 84 is 36, she spent 36 dollars on the bag. This works out because the other 4/7 of the money not spent is 48 dollars, and the difference between 48 and 36 is 12.