So you notice that there is an x by x square in each corner:
4x^2
There are two x by 5 rectangles on the vertical: 2*5x=10x
The two rectangles on the horizontal have dimensions 4 by x:
2*4x=8x
The total area is all of them added together:
8x+10x+4x^2 =
18x+4x^2