Onfido Interview Question

how would you solve the problem given ?