Let us say that:
x = hours worked by Wolfgang
y = hours worked by Heinrich
So that:
x = y + 10
14 x + 12 y = 3520
By combining the two equations:
14 (y + 10) + 12 y = 3520
14 y + 140 + 12 y = 3520
26 y = 3380
y = 130 hours
x = y + 10 = 140 hours
So Wolfgang worked 140 hours while Heinrich worked 130 hours.