Pregunta de entrevista de Altisource

Difficult puzzle question