Check the picture below.
so let's find "x" or namely the base of the triangle, keeping in mind that the triangle has a height of 3, and that there are four of those triangles, then we'll get their area and the area of the green square and sum them all up.