Here we have to solve a system of linear equations in three variables. Let:
x: Cost of pens
y: Cost of pencils
We know that:
[tex]2x+6y=7 \ ... \ eq1[/tex]
[tex]3x+5y=7.5 \ ... \ eq2[/tex]
Multiplying eq1 by 3 and eq 2 by -2:
[tex]\bullet \ 3(2x+6y)=3(7) \\ \\ 6x+18y=21 \\ \\ \\ \bullet \ -2(3x+5y)=-2(7.5) \\ \\ -6x-10=-15[/tex]
Then adding these two resultant equations:
[tex]6x+18y=21 \\ \\ -6x-10y=-15 \\ \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \\ \\ 8y=6 \\ \\ y=0.75 \\ \\ \\ So \ from \ eq \ 1: \\ \\ 2x+6(0.75)=7 \\ \\ 2x=7-4.5 \\ \\ 2x=2.5 \\ \\ x=1.25[/tex]
How much will Maggie spend to purchase 4 pens?
Each pen costs $1.24, so 4 pens will cost:
[tex]\text{Cost of 4 pens}=4(1.25)=\boxed{\$5}[/tex]