Let the sides of the two squares be \( a \) and \( b \), where \( a>b \).
Step 1: Use the sum of areas.
The area of a square is \( \text{side}^2 \). We are given that the sum of the areas of the squares is 117 m\(^2\):
\[
a^2 + b^2 = 117 \quad \text{(Equation 1)}.
\]
Step 2: Use the difference of perimeters.
The perimeter of a square is \( 4 \times \text{side} \). We are given that the difference between the perimeters is 12 m:
\[
4a - 4b = 12 \quad \implies \quad a - b = 3 \quad \text{(Equation 2)}.
\]
Step 3: Solve the system of equations.
From Equation 2, we have:
\[
a = b + 3.
\]
Substitute \( a = b + 3 \) into Equation 1:
\[
(b + 3)^2 + b^2 = 117,
\]
\[
(b^2 + 6b + 9) + b^2 = 117,
\]
\[
2b^2 + 6b + 9 = 117,
\]
\[
2b^2 + 6b - 108 = 0.
\]
Divide the entire equation by 2:
\[
b^2 + 3b - 54 = 0.
\]
Step 4: Solve the quadratic equation.
The quadratic equation is \( b^2 + 3b - 54 = 0 \). Use the quadratic formula:
\[
b = \frac{-3 \pm \sqrt{3^2 - 4(1)(-54)}}{2(1)} = \frac{-3 \pm \sqrt{9 + 216}}{2} = \frac{-3 \pm \sqrt{225}}{2} = \frac{-3 \pm 15}{2}.
\]
Thus, the two solutions are:
\[
b = \frac{-3 + 15}{2} = 6 \quad \text{or} \quad b = \frac{-3 - 15}{2} = -9.
\]
Since \( b \) is a side length, we take \( b = 6 \).
Step 5: Find \( a \).
Substitute \( b = 6 \) into Equation 2:
\[
a = 6 + 3 = 9.
\]
Thus, the sides of the squares are \( a = 9 \) m and \( b = 6 \) m.
Conclusion:
The sides of the two squares are 9 m and 6 m.