The problem can be solved in the following way:

Say, the number of cows Ben have is x and the number of ducks Ben have is y

Therefore, total number of cows and ducks is x+y=22 ------ (I)

If one cow has 4 legs, then x cows will have 4x legs

Also, if one duck has 2 legs, then y ducks will have 2y legs

Therefore, total number of legs is 4x+2y=56 ------(ii)

Equations (I) and (ii) will be solved now

From (I), x=22-y

Putting the value of x from (I) in (ii),

4(22-y)+2y=56

88-4y+2y=56

-2y=-32

y=16

Putting the value of y in equation (I)

x=22-16

x=6

Therefore, the number of cows is 6 and the number of ducks is 16

Say, the number of cows Ben have is x and the number of ducks Ben have is y

Therefore, total number of cows and ducks is x+y=22 ------ (I)

If one cow has 4 legs, then x cows will have 4x legs

Also, if one duck has 2 legs, then y ducks will have 2y legs

Therefore, total number of legs is 4x+2y=56 ------(ii)

Equations (I) and (ii) will be solved now

From (I), x=22-y

Putting the value of x from (I) in (ii),

4(22-y)+2y=56

88-4y+2y=56

-2y=-32

y=16

Putting the value of y in equation (I)

x=22-16

x=6

Therefore, the number of cows is 6 and the number of ducks is 16