I want to maximize a log-likelihood function (L) that is a function of parameters $\beta_i$ for $i=1,..,k$ and $\alpha_1, \alpha_2$. Ideally, I want to perform the estimation of all parameters in one step. Unfortunately, I cannot perform one step estimation due to the form of the model I have. But for some fix values of $\alpha_1, \alpha_2$, I can find the maximum likelihood estimations of $\beta_i$ for $i=1,..,k$. So what I did is that I created a function like $f(\alpha_1, \alpha_2)$ and defined it as $f(\alpha_1, \alpha_2)=L(\alpha_1, \alpha_2,\hat{\beta})$ i.e. the log-likelihood corresponding to $\alpha_1, \alpha_2$. Then I maximized this function $f$ numerically with respect to $\alpha_1, \alpha_2$.
Does this approach solve the inconsistency of the two stages estimation that I have? Is this a valid approach at all? If not, is there any other estimation method that I can use?