THe length of each cube is inreasing by 1. This means that the increment is in arithmetic sequence.
The formula for determining the nth term of an aritmetic sequence is expressed as
Tn = a + (n - 1)d
Where
a represents the first tem of the sequence
Common difference, d represents the difference between consecutive terms
Given that a = 3, d = 1
Tn = 2 + (n - 1)1
Tn = 2 + n - 1
Tn = 1 + n
For the 18th term, n = 18
T18 = 1 + 18 = 19
The number of boxes in the square for the 19th term is
19 * 19 = 361