J.P. Morgan Interview Question

Given a case find the solution