J.P. Morgan interview question

Given a case find the solution