One way to solve this is to look at the size of the poster, and then subtract the size of the picture so you have the area that needs to be painted left.
Area of square poster - 3x × 3x = 9x^2
Area of painting - 2x × 2x = 4x^2
9x^2 - 4x^2 = 5x^2
The area is 5x^2