State Farm interview question

Explain your approach to the previous question