Focal Length is what it says, the lenght between a certain point within the lens assembly and the plain of sharp image of a subject at infinity.
It is a constant for a lens and independant from image size.
DOF is a length that depends on the degree of un-sharpness one would accept. And that again is a matter of scale of the final image respectively the format you use for taking and the respective successive enlargement.
You should read a textbook on this matter.
However your issue about a large difference in DOF between those two lenses remains:
Here you got an online DOF calculator that includes the macro range, to play with:
http://www.erik-krause.de/schaerfe.htm
You not only can calculate how at same object distance a variation of focal length results in different DOF, but also see how the ratio between near- and far-point changes with the image scale.