State Farm interview question

coding string manipulation question with why state farm