The resistance of a wire is given by rho*l/A , where rho is the resistivity, l is the length of the wire and A is the area of cross-section.
Now, it is assumed that the three wires are of the same material and hence the resistivity and density is the same.
The mass of a wire is the product of the density, the area of cross-section and the length.
Let us denote the three wires as W1, W2 and W3. Their masses are in the ratio 1:3:5 and their lengths are in the ratio 5:3:1.
If the mass of W1 is M , W2 weights 3M and W3 weighs 5M. If W3 has a length L, W2 has a length 3L and W1 has a length 5L.
Using this notation, we write the area of cross-section of W1 as M/5L, the area of cross-section of W2 by 3M/3L and the area of cross-section of W3 by 5M/L.
So the resistance of W1 is rho*5L/ (M/5L), W2 has a resistance rho*3L/(3M/3L) and W3 has a resistance rho*L/(5M/L)
The ratio of resistance is rho*5L/ (M/5L) : rho*3L/(3M/3L):rho*L/(5M/L)
=> 5L/ (M/5L): 3L/(3M/3L) : L/(5M/L)
=> 25L^2/M : 9L^2/3M : L^2/5M
=> 25 : 9/3 : 1/5
=> 25 : 3 : (1/5)
Therefore the ratio of their resistance is 125 : 15 : 1.