Is it like this?

(The position of the red square inside the blue square doesn't matter.)
To find the area of the shaded region, all we need to do is find the area of the bigger, blue square, and subtract from it the area of the smaller, red square.
shaded area = blue square area - red square area
blue square area = side2 = (x + 5)2
red square area = side2 = (x - 2)2
shaded area = (x + 5)2 - (x - 2)2
shaded area = (x + 5)(x + 5) - (x - 2)(x - 2)
shaded area = [x2 + 10x + 25] - [x2 - 4x + 4]
shaded area = x2 + 10x + 25 - x2 + 4x - 4
shaded area = 14x + 21 sq. units.