Given maximization problem define the Lagrangian,
Notice that the Lagrangian is a function of the choice variables $\mathbf x$ and also of the Lagrangian multipliers $\boldsymbol \lambda$
If $\mathbf x^\ast$ solves the maximization problem then there are Lagrange multipliers $\boldsymbol \lambda^\ast$ such that $$\nabla_{\mathbf x,\boldsymbol \lambda} \mathcal{L}=0,$$ where $\nabla_{\mathbf x} \mathcal{L}$ is the gradient of $\mathcal{L}$, the list of first partial derivatives of $\mathcal{L}$ with respect to each one of the variables: $$\diff{}{x_{i}} \mathcal{L}=0 \text{ for } i=1,\ldots,n \text{ and }\diff{}{\lambda_{j}} \mathcal{L}=0\text{ for }j=1,\ldots,k.$$
Warning! You must check if the solution of these equations corresponds to a maximum or if it corresponds to a minimum.