For a DNA strand composed of the sequence AGT in the 5' to 3' direction, the free phosphate is on the A nucleotide and the free hydroxyl is on the T nucleotide.
The free phosphate is always at the 5' end of the DNA and the free hydroxyl is always at the 3' end of the DNA.