Explanation:
the area of the whole large square is (3x)² = 9x²
when combining 2 shaded triangles they build a small square of x×x or x².
since we have two pairs of such triangles, we have two small squares, and their combined area is x² + x² = 2x²
that means that the whole remaining unshaded area is
9x² - 2x² = 7x²
and so, the ratio shaded/unshaded area is
(2x²)/(7x²) = 2/7