Answer:
10 spiders and 12 ants
Explanation:
You need to create two equations
s = # of spiders
a = # of ants
s + a = 22 heads
since each spider and ant has one head
8s + 6a = 152 legs
since every spider has 8 legs and every ant has 6
s + a = 22 can be turned into s = 22 - a
now use substitution
8(22 - a) + 6a = 152
176 - 8a + 6a = 152
176 - 2a = 152
24 = 2a
a = 12
now that you have the number of ants you can solve for the number of spiders
s + a = 22
s + 12 = 22
s = 10