Domanda di colloquio di Rover.com

How would you write this objective function?