We have a chemical reaction taking place, of which the amount of mass consumed/formed of each compound are related.
"It takes 1 kg of

and 3 kg of

to form 4 kg of

".
So that means that every time we gain a kg of

, the mass of

decreases by

kg. Since we started with 2 kg of

we subtract

times the mass of

, as

is the mass of compound

at time

. What we have left is dependent on the amount of compound

we have, so the mass of compound

is given by

.
A similar situation goes for compound

. Every time we gain a kg of

, the mass of

decreases by

kg, and starting with 3 kg means we have

.
Now the rate of increase of

is proportional to the product of

and

.
}<br />\\ m_{A} & =2-\frac{1}{4}x<br />\\ m_{B} & =3-\frac{3}{4}x<br />\\ \frac{dx}{dt} & =k\left(2-\frac{1}{4}x\right)\left(3-\frac{3}{4}x\right)<br />\\ & =k\times\frac{1}{4}\left(8-x\right)\times\frac{3}{4}\left(4-x\right)<br />\\ & =\frac{3k}{16}\left(8-x\right)\left(4-x\right)<br />\end{alignedat})
Hope that helps

EDIT: For part b, flip

and the RHS and try integrating, using partial fractions.