Well, I don't think you need to break out the x's and y's for this question. You could if you wanted I suppose.

Your cost is $12.00. And you want to find a 40% mark-up on selling price. Therefore your cost = 60% of the selling price. i.e. $12 is 60% of selling price. Selling price will be 100%.

So if $12 = 60%,

$0.20 = 1% (After dividing both sides by 60).

And $20 = 100% (After multiplying both sides by 100).

Answer - selling price = $20, and mark-up is 20 - 12 = $8.