x = amount of 18% solution (oz)
y = amount of pure water (oz)
Stephanie wants to end up with 12 oz of a 12% solution, so
x + y = 12 ==> y = 12 - x
x oz of 18% solution contains 0.18x oz of acid. After adding y oz of pure water, the amount of acid stays the same, but the volume of liquid changes.
The new concentration would be such that
0.18x / (x + y) = 0.12
Replace y with 12 - x, then solve for x and then y :
0.18x / (x + (12 - x)) = 0.12
0.18x / 12 = 0.12
0.18x = 1.44
x = 1.44/0.18 = 8 oz
y = 12 - x = 4 oz