(1) if there are x geese and y turtles respectively, then there are:
x+y=80
2x+4y=240
Solution: x=40 y=40
(2) This solution is actually very interesting:
Suppose I whistle and both the tortoise and the goose raise one leg, then:
When I whistle for the first time, I always raise 80 legs.
When you blow the whistle for the second time, you always raise 160 legs, and 80 legs land.
At this time, the geese are all sitting on the ground, and each turtle has two legs next to the ground, so there are 40 turtles, so there are 40 geese.