I guess the text considers the problem
$$\max_{x,Q,t_L,t_Q,t_{cc},t_m,t_L,q} u(x,Q,t_L),$$
subject to
$$Q(t_Q,t_{cc}q)- Q=0$$
$$1-t_Q-t_{cc}\geq0$$
$$1-t_m-t_L-t_Q\geq 0$$
$$t_mW+V-x-p_{cc}t_{cc}\geq 0$$
the Lagrangian for which is
$$\mathcal L(.) = u(x,Q,t_L) + \lambda_1(Q(t_Q,t_{cc}q)-Q) + \lambda_2(1-t_Q-t_{cc}) + \lambda_3(1-t_m-t_L-t_Q) + \lambda_4 (t_mW+V-x-p_{cc}t_{cc})$$
The derivatives of the function $Q(.,.)$ with respect to the first argument are denoted $Q_1$ and for the second argument $Q_2$. Differentiating the Lagrangian function with respect to the choice variables results in the following first order conditions
$$\frac{\partial \mathcal L}{\partial x} = \frac{\partial \mathcal u}{\partial x} - \lambda_4 = 0$$
$$\frac{\partial \mathcal L}{\partial Q} = \frac{\partial \mathcal u}{\partial Q} - \lambda_1 = 0$$
$$\frac{\partial \mathcal L}{\partial t_L} = \frac{\partial \mathcal u}{\partial t_L} - \lambda_3 = 0,$$
assuming all three marginal utilities to be strictly positive in optimum it follows from the KKT complementarity conditions that constraint 4,1 and 3 are binding (as the constraints are also stated to be in the text).
Further first-order conditions are
$$\frac{\partial \mathcal L}{\partial t_Q} = \lambda_1 Q_1 - \lambda_2 - \lambda_3 = 0$$
$$\frac{\partial \mathcal L}{\partial t_{cc}} = \lambda_1 Q_2q - \lambda_2 - \lambda_4p_{cc} = 0$$
$$\frac{\partial \mathcal L}{\partial t_m} = -\lambda_3 + \lambda_4 W = 0,$$
the only Lagrange coefficient not determined as a marginal utility is $\lambda_2$ but we can get
$$\lambda_2 = \lambda_1 Q_2q-\lambda_4 p_{cc} = \lambda_1 Q_1 - \lambda_3,$$
and therefore
$$\lambda_3 = \lambda_1 (Q_1 - Q_2q) + \lambda_4 p_{cc},$$
divide with $\lambda_4$ - which we know is strictly positive - and use that $\lambda_3/\lambda_4 = W$ to get
$$W = \frac{\lambda_1}{\lambda_4}(Q_1 - Q_2q) + p_{cc}$$
which gives the results upon substitution of expressions for $\lambda_1$ and $\lambda_4$ in terms of marginal utilities.
Finally, treat $p_{cc}$ as a function of $q$ and differentiate Lagrangian with respect to $q$ to get
$$\frac{\partial L(.)}{\partial q} = \lambda_1 Q_2 t_{cc} -\lambda_4t_{cc} \frac{\partial p_{cc}}{ \partial q} =0,$$
$$t_{cc}\lambda_4 \left(\frac{\lambda_1}{\lambda_4} Q_2 - \frac{\partial p_{cc}}{ \partial q}\right)=0,$$
hence assuming internal solution for $t_{cc}>0$ it follows that
$$\frac{\lambda_1}{\lambda_4} Q_2 = \frac{\partial p_{cc}}{ \partial q}$$ where in the text it simply says $Q_2 = \frac{\partial p_{cc}}{ \partial q}$ I'm guessing this is simply because $\frac{\lambda_1}{\lambda_4}$ is ignored as some in optimum irrelevant utility scaling constant.