Objective function with variables solved separately

Sir,

I have a objective function say f(a,b) where, a and b are both variables. I solve a and b in two different sub-problem and got the optimal value. Now, as the optimal a and b are calculated, do I need to further optimize the f(a,b)? or directly putting the value of a and b will give me the optimized value of my function?

My optimization function look like :
maximize (over a, b) f(a,b)
s.t some constraints.

My function is a ratio say f(a,b)=g(a,b)/h(a,b), I apply Dinklebach algorithm, but my variables are optimized in two different sub problem.

That is a matter of how (your implementation of) Dinklebach’s algorithm works, and not how CVX works. You shouldn’t use the algorithm without understanding it. Certainly you need to understand and properly implement termination and optimality criteria, and pay attention to any iterative and subproblem determination aspects.