Answer:
The number of ducks were sold be 48
Explanation:
Let the number of chicken be 3x and the number of ducks on a farm be 8x.
From the given conditions, it is states that there were 40 more ducks than chicken, i.e
8x+40=3x
or
or 5x=40
Simplify:

Then, the number of chicken be

and the number of ducks be,
.
Since it is given that half the chicken and some of the ducks were sold ; then the ratio of the number of chicken to the number of ducks became 3:4
Let the number of ducks that were sold be y.
now by above condition, we have

then,

Simplify:
or
or

On simplify we get,
y=48.
Therefore, the number of ducks were sold be, 48.