I am trying to understand how the first order conditions for an interior solution of a maximization problem were derived using the substitution method.
The problem is: $$\max\limits_{x\ge0,y\ge0}P(a-x)+(1-P)(b-y)$$ subject to $$Pf(x)+(1-P)f(y)=c$$ where: $a,b,c>0$, $P\in (0,1)$, $f:[0,+\infty]\to[0,+\infty]$, increasing and strictly concave over its domain.
I can see how this is solved using a lagrangian to find from the first order conditions that $f'(x^*)=f'(y^*)$. Strict concavity of $f$ then implies $x^*=y^*$. But I'm at a loss as to how we can solve it by substituting the constraint in the objective function. Since $f$ is invertible, if $y$ did not appear in the constraint I would find $x$ from the constraint by inverting $f$ and substitute it in the objective function. Doing this here leads to complications that seem unnecessary for this simple problem. There has to be a simpler way that I cannot figure out: what is it? Thanks!