Let \( S \) represent the total weight of persons A, B, and C, and \( \frac{S}{3} \) their average weight.
When person D joins, the new average is \( \frac{S + w_D}{4} \), which is \( x \) kg less than the original average:
\(\frac{S}{3} - x = \frac{S + w_D}{4}\)
Multiplying by 12 gives:
\(4S - 12x = 3S + 3w_D\)
Simplifying yields:
\(S = 12x + 3w_D\)
If person E joins instead, the average increases by \( 2x \) kg:
\(\frac{S}{3} + 2x = \frac{S + w_E}{4}\)
Multiplying by 12 gives:
\(4S + 24x = 3S + 3w_E\)
Simplifying yields:
\(S = 24x + 3w_E\)
Equating the two expressions for \( S \):
\(12x + 3w_D = 24x + 3w_E\)
Dividing by 3 gives:
\(4x + w_D = 8x + w_E\)
Given \( w_E = w_D + 12 \), substitute into the equation:
\(4x + w_D = 8x + w_D + 12\)
Simplifying to solve for \( x \):
\(-4x = 12\)
Therefore, \( x = 1 \).