Explanation
Let's denote the two parts as x and 12 - x.
The sum of their squares is x² + (12 - x)².
Twice their product is 2x(12 - x).
According to the problem:
x² + (12 - x)² - 2x(12 - x) = 4
x² + 144 - 24x + x² - 24x + 2x² = 4
4x² - 48x + 140 = 0
x² - 12x + 35 = 0
(x - 7)(x - 5) = 0
x = 7 or x = 5
The two parts are 5 and 7.
Let's check:
5² + 7² = 25 + 49 = 74
2 × 5 × 7 = 70
74 - 70 = 4
This satisfies the condition.
The answer is 5 and 7.