Can someone show me how and what the optimality condition between…