Step 1: Apply the first law of thermodynamics.
\[
\Delta U = Q - W.
\]
Step 2: For path 1,
\[
\Delta U = 50 - 30 = 20\, \text{J}.
\]
Since internal energy change depends only on initial and final states, \( \Delta U \) remains the same for both paths.
Step 3: For path 2,
\[
20 = 30 - W_2 \Rightarrow W_2 = 10\, \text{J}.
\]
Step 4: Final Answer.
The work done along path 2 is 10 J.