Grids | Math Problem

Click here to read the complete problem statement.

Can anyone give me hints for this question