Since both wires are made of the same material and have the same mass, they also have the same volume. Let \(\rho\) be the resistivity, \(A\) the cross-sectional area, \(V\) the volume, and \(\ell\) the length.
The resistance \(R\) of a wire is given by:
\[ R = \frac{\rho \ell}{A} = \frac{\rho V}{A^2}. \]
Since \(V\) is constant for both wires, we can write:
\[ \frac{R_A}{R_B} = \frac{A_B^2}{A_A^2} = \frac{r_B^4}{r_A^4}. \]
Given \(R_B = 2 \, \Omega\), \(r_B = 4 \, \text{mm}\), and \(r_A = 2 \, \text{mm}\), we substitute these values:
\[ \frac{R_A}{2} = \left(\frac{4 \times 10^{-3}}{2 \times 10^{-3}}\right)^4. \]
Simplifying this, we get:
\[ \frac{R_A}{2} = 16, \]
which gives:
\[ R_A = 32 \, \Omega. \]