We can create two equations:
x represents polar bears and y represents penguins.
x + y = 47 to represent the heads
4x + 2y = 116 to represent the feet.
Simplify the feet equation by dividing by 2:
2x + y = 58
Now we can subtract the two equations:
x + y = 47
-(2x+y=58)
And we get -x = -11
x = 11, so there are 11 polar bears.
Now plug this value into the first equation:
(11) + y = 47
y = 36, so there are 36 penguins.