It is assumed that the wire across which the potential difference is 6 V has a uniform cross-section. In this case, if the resistance of the complete wire is R, the resistance across a 3 cm segment is (3/15)*R = R/5.
The current that passes through the wire due to the potential difference V is given by I = V/R. As V = 6V, I = 6/R.
Voltage measured across a resistor with resistance R through which a current I is flowing is given by V = I*R.
As the current is 6/R and the resistance of the 3 cm wire is R/5, the voltage measured across this is (6/R)*(R/5) = (6/5) = 1.2 V
The voltage measured across a 3 cm segment of the 15 cm long wire with a potential difference of 6 V across it is 1.2 V.