Let the two consecutive even numbers be \( x \) and \( x + 2 \).
Step 1:
The sum of their squares is given by:
\[
x^2 + (x + 2)^2 = 340.
\]
Step 2:
Expand the equation:
\[
x^2 + (x^2 + 4x + 4) = 340.
\]
Step 3:
Simplify the equation:
\[
2x^2 + 4x + 4 = 340.
\]
Step 4:
Move all terms to one side:
\[
2x^2 + 4x + 4 - 340 = 0 \quad \Rightarrow \quad 2x^2 + 4x - 336 = 0.
\]
Step 5:
Divide the entire equation by 2 to simplify:
\[
x^2 + 2x - 168 = 0.
\]
Step 6:
Solve this quadratic equation using the quadratic formula:
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a},
\]
where \( a = 1 \), \( b = 2 \), and \( c = -168 \).
Substitute the values:
\[
x = \frac{-2 \pm \sqrt{2^2 - 4(1)(-168)}}{2(1)} = \frac{-2 \pm \sqrt{4 + 672}}{2} = \frac{-2 \pm \sqrt{676}}{2}.
\]
Since \( \sqrt{676} = 26 \), we have:
\[
x = \frac{-2 \pm 26}{2}.
\]
Step 7:
Thus, \( x = \frac{-2 + 26}{2} = \frac{24}{2} = 12 \) or \( x = \frac{-2 - 26}{2} = \frac{-28}{2} = -14 \).
Since we are looking for positive even numbers, we take \( x = 12 \). Therefore, the two consecutive even numbers are \( 12 \) and \( 14 \).
Conclusion:
The two consecutive even numbers are 12 and 14.