Domanda di colloquio di Mobility Quest

Matrix problem which is much confusing