Wayfair Interview Question

I was given a first order condition optimization problem.