Current Value Hamiltonian

I have problems with writing the current value Hamiltonian and finding the related necessary and sufficient conditions:

I should max the RHS of : $$\rho U_t = log (\chi) + \frac{1}{\rho} log(\lambda)+ M(t)log(\lambda)$$

s.t.(resource constraint): $$a(\lambda)t + \chi = L$$ ; and $$M=\dot{\mu}$$

According to the book, substitute for $$\chi$$ from the resource constraint and solve the problem that has $$\mu \ge 0$$ and $$\lambda \ge0$$ as the only constraints

$$\frac{log(\lambda)}{\rho}=\frac{a(\lambda)}{L-a(\lambda)\mu}$$ $$~~$$[1]

$$\frac{a'(\lambda)\mu}{L-a(\lambda)\mu}=\frac{\mu}{\rho \lambda}$$ $$~~$$[2]

Where $$\chi$$ is the total amount of labor in manufacturing corresponding to the optimal aggregate demand for intermediate goods (since one unit of labor manufactures one unit of intermediate, and we have a unit continuum of industries).
$$\lambda$$ is the step-size of the innovation (innovation evolves stochastically and increases in each period by a factor of $$\lambda > 1$$, with probability $$\mu dt$$ in a time interval $$dt$$. $$\mu$$ is the rate of innovation

M(t) is the expected number of successes in innovation before time $$\tau$$ : $$M(\tau)= \int_{0}^{\tau} \mu(s) d s$$.

$$L$$ is labor and $$a(\lambda)$$ is an increasing function.

Sorry for this question but what I learned in class was:

FOC:

1. derivative hamiltonian w.r.t. controls variables=0

2. derivative hamiltonian w.r.t. state variable = d(costate variable)t

3. transversality condition

How to find [1],[2]?