Option (A) is correct.
Explanation:
Each L-shaped border adds the next odd number of tiles, and the total after n steps is the sum of the first n odd numbers, which is n2.
Since 400=20×20=202, Ravi's square is 20×20. It was made from the first 20 odd numbers (counting the first single tile as the first one).
The nth odd number is 2n−1, so the 20th odd number is
2×20−1=39
Check: just before the last border the square was 19×19=361 tiles, and 400−361=39.
Why the other options are wrong
- (B) 40=2×20. An L-border has an odd number of tiles; the corner tile is shared by both arms, so it is 20+20−1=39.
- (C) 20 is the number of tiles along one side of the finished square, not the number in the last border.
- (D) 41=2×20+1 is the border that would turn the 20×20 square into a 21×21 square (441−400=41).