Tilling problem2

sir please help me i get time limit while solving this question…