Estimates for solutions to optimization problems on elliptic equations