Pergunta de entrevista da empresa Airlines Reporting Corporation

How would you solve deadlock?