There were 17 zebras and 26 pelicans.

Algebra will quickly solve this problem for us:If there were Z zebras and P pelicans:

we have

Z + P = 43 heads [1]

and

4Z + 2P = 120 feet [2]

Subtracting P from both sides of [1] gives

Z = 43 - P [3]

Using [3] in [2] we get

4 x (43 - P) + 2P = 120

172 - 4P + 2P = 120 (expand the brackets)

172 - 2P = 120 (simplify)

172 = 120 + 2P (add 2P to both sides)

172 - 120 = 2P (subtract 120 from both sides)

52 = 2P (simplify)

26 = P (divide each side by 2)

Using P = 26 in [3] gives Z = 17. QED.