Let the number of lions be x and the number of peacocks be y.
The total number of lions and peacocks in a certain zoo is 50.
So, .....(I)
The total number of their legs is140.
Lion has 4 legs while peacock has 2.
Subtracting (II) from (I) we have
Thus, the number of lions = 20 and the number of peacocks = 30.