Well, you could set up a group of simultaneous equations to be solved using either elimination or Cramer's Rule:

Let x be the number of 2 legged scroboscopi

and y be the number of 3 legged scroboscopi

and z be the number of 5 legged scroboscopi

2x + 3y + 5z = 58 (1)

4x + 9y + 25z = 164 (2)

16x + 81y + 625z = 1976 (3)

Well, since I'm bored and I don't have/know how to use Latex I'll just go through elimination with you.

Let's firstly eliminate the x, since it's the simplest to get rid of. Futhermore, we must use a combination of equations.

Using the first 2 equations:

2x + 3y + 5z = 58 (1)

4x + 9y + 25z = 164 (2)

(1) * 2

4x + 6y + 10z = 116 (1')

(2) - (1')

3y + 15z = 48 (4)

Then using the first and third:

2x + 3y + 5z = 58 (1)

16x + 81y + 625z = 1976 (3)

(1) * 8

16x + 24y + 40z = 464 (1'')

(3) - (1'')

57y + 585z = 1512 (5)

Simultaneously solving (4) and (5) we get:

3y + 15z = 48 (4)

57y + 585z = 1512 (5)

(4) * 19

57y + 285z = 912

(5) - (4')

300z = 600

*z = 2*

Going back to (1) and (2):

2x + 3y + 5z = 58 (1)

4x + 9y + 25z = 164 (2)

Plugging in z and simplifying we get:

2x + 3y = 48 (1''')

4x + 9y = 114 (2')

(1)*2

4x + 6y = 96 (1'''')

(2) - (1'''')

3y = 18

*y = 6*

Plugging y into (1''') we get:

2x + 18 = 48

2x = 30

*x = 15*

Yes I know my equation labels are messed up, anyway:

~-*There are 15 scroboscopi with 2 legs, 6 scroboscopi with 3 legs, and 2 scroboscopi with 5 legs*-~

or something like that...i think