The heat \( H \) liberated by a current \( I \) flowing through a resistor \( R \) over a time \( t \) is given by Joule’s Law:
\[
H = I^2 R t
\]
Where:
- \( H = 20 \, \text{J} \) (the heat liberated)
- \( I = 2 \, \text{A} \) (current)
- \( t = 2.5 \, \text{s} \) (time)
Substituting the given values into the equation:
\[
20 = (2)^2 R \times 2.5
\]
\[
20 = 4 R \times 2.5
\]
\[
20 = 10 R
\]
\[
R = \frac{20}{10} = 2 \, \Omega
\]
Thus, the resistance of the wire is \( 2 \, \Omega \).
Hence, the correct answer is (D) 2 \( \Omega \).