Answer: 9 energy drinks and 18 granola bars.
Explanation:
Price per granola bar = $0.50
Price per energy drink = $2.
We can define G as the number of granola bars that she bought, and D as the number of drinks that she bought.
Then
"She buys twice as many granola bars as energy drinks."
G = 2*D
" If she spends $27 in total"
G*$0.50 + D*$2 = $27
So we have a system of equations:
G = 2*D
G*$0.50 + D*$2 = $27
The first step will be to replace the first equation into the second one, and solve it for D.
(2D)*$0.50 + D*$2 = $27
D*(2*$0.50) + D*$2 = $27
D*$1 + D*$2 = $27
D*$3 = $27
D = $27/$3 = 9.
So she bought 9 energy drinks, and we know that:
G = 2*D
G = 2*9 = 18
She bought 18 granola bars.