Let number of basketball be "b", and number of football be "f".
We can write 2 equations from the statements.
"bought 5 less basketballs than footballs":
[tex]f=b+5[/tex]"Basketballs cost 26 and footballs cost 40 dollars each and total spent is 860 dollars":
[tex]26b+40f=860[/tex]We can substitute equation 1 into equation 2 and solve for b. Shown below:
[tex]\begin{gathered} 26b+40f=860 \\ 26b+40(b+5)=860 \\ 26b+40b+200=860 \\ 66b=860-200 \\ 66b=660 \\ b=\frac{660}{66} \\ b=10 \end{gathered}[/tex]Now, we can find f:
[tex]\begin{gathered} f=b+5 \\ f=10+5 \\ f=15 \end{gathered}[/tex]So,
10 basketballs bought and 15 footballs bought