Progressive Insurance interview question

Code explaination and system design