Okay, let's use x for the 24 page packages and y for the 30 page packages:
x + y = 9
x = -y + 9
Now here's the second equation:
24x+30y = 258
We can input y into our second equation:
24(-y + 9) + 30y = 258
-24y + 216 + 30y = 258
6y = 42
y = 7
9 - 7 = 2, so:
Joann bought 7 :30 paper pakages
and 2 :24 paper packages