In this problem, it is something of the form ## s=u_a v_a+u_b v_b ##. In this case ## \frac{\partial{s}}{\partial{s}}=u_a (\frac{\partial{v_a}}{\partial{s}})+v_a (\frac{ \partial{u_a}}{\partial{s}}) + (similarly \, for \, b)##. The partials on ## u ## and ## v ## are done with the chain rule. (We also have ## s=s(u_a, v_a, u_b,v_b) ##, and we apply the chain rule in taking the partial w.r.t. ##s ##, e.g. first taking the partial w.r.t. ## u_a ##, and treating the others as constants, etc., and then taking partial w.r.t. ## v_a ##, etc.).