TPP Interview Question

Marble logic question