X ≈ 9.33 units
Explanation:
As triangle DOG is similar to triangle CAT, the ratios of the sides are the same
AT/OG = CA/DO
x/4 = 7/3
x = 28/3
x ≈ 9.33
For #31 you would make two squares on the left and right side and then four rectangles in the middle