Mistplay interview question

Q: How would you go about implementing this?