Yes, algebraically there would be no problem in doing that if you wish. I was taught the equivalent notation:
If given subject to the constraint , then we wish to solve the following system:
Then we draw an implied relationship between the two independent variables from the first to equations which we then use in the third to get the critical point(s).