We will use heat conservation principle. The temporal change in the heat content must be equal and opposite to the spacial change in the total heat flux.
Therefore we can see this expression. The rate of change of this heat content is equal to spacial change in the total heat flux.
We have seen that this L.H.S. is function of ql and T and which are in turn functions of time.
Therefore when we do the differentiation we need to do it carefully by applying chain rule.