Answer:
Number of ducks = 37 
Number of pigs = 18
Explanation:
Let, 
x be the number of ducks 
y be the number of pigs
According to given statement;
x+y=55 Eqn 1 
2x+4y=146 Eqn 2 (As ducks will have 2 legs and pigs will have 4) 
Multiplying Eqn 1 by 2 
2(x+y=55)
2x+2y=110 Eqn 3 
Subtracting Eqn 3 from Eqn 2 
(2x+4y)-(2x+2y)=146-110
2x+4y-2x-2y=36
2y=36 
Dividing both sides by 2 

Putting y=18 in Eqn 1 
x+18=55
x = 55-18 
x = 37
Hence, 
Number of ducks = 37 
Number of pigs = 18