Jennifer M. answered 08/18/19
Experienced AP and College Calculus and Physics Tutor
First given the situation with 4x5 squares for the rectangle. If you draw this situation out as a grid, the only squares that are completely surrounded by other squares are those in between the first and last columns and between the top and bottom rows. The number of squares completely surrounded is 6.
Thinking about this situation... if we have 4 columns across and 5 rows down, we can get our value of 6 by taking the number of columns and subtracting 2 (for the first and last column) and taking the number of rows and subtracting 2 (for the top and bottom rows).
(4-2)x(5-2)
2x3=6
Now let's put this in terms of dimensions pxq
(p-2)(q-2) will give you the number of squares completely surrounded by other squares FINAL ANSWER

David W.
. . . and, in terms of a and b, this is (a-2)(b-2). You may also write: ab-2a-2b+4 [using F-O-I-L]08/18/19