Spider has eight legs and a dragonfly has six legs. there are 20 spiders and dragonflies altogether. There are 144 legs in all. find the number of spiders, and the number of dragonflies

Let's solve this problem algebraically:

Let x be the number of spiders.
Therefore, the number of dragonflies is 20 - x.

The total number of spider legs is 8x.
The total number of dragonfly legs is 6(20 - x) = 120 - 6x.

The total number of legs is the sum of the spider and dragonfly legs:
8x + 120 - 6x = 144.

Combining like terms, we get:
2x + 120 = 144.

Subtracting 120 from both sides, we have:
2x = 24.

Dividing both sides by 2, we get:
x = 12.

Therefore, the number of spiders is 12, and the number of dragonflies is 20 - 12 = 8.