Answer:
$12
Explanation:
Let's assume that buns cost x and cakes y dollars
Now, let's write two equations according to the given information and put them in a system:


From the 2nd equation: y = 3x
Replace y in the 1st equation:




We found the price of one bun
Since we know that one cake costs thrice as much as a bun, we can find the price of one bun:
y = 3 × 2 = 6
Now multiply this number by 2 and we'll get the answer
2 × 6 = $12