The same lens is the same focal length, regardless of which DX or FX body it is on. There is absolutely no change to the lens.
A DX lens simply only covers a DX sensor, and will not cover the corners of a larger FX sensor. A FX lens will.
A DX 300 mm lens and a FX 300 mm lens are both 300mm.
The difference in DX and FX is called "crop factor", due to sensor size.
The DX sensor is smaller, so it crops that image smaller, for a more narrow view... which then (with Same lens, standing in same spot, focused on same spot) makes DX LOOK like a 1.5x longer lens than does a FX 1.5x wider field of view.
It is ALL about the crop (of that same lens) resulting from the sensor size.
The field of view is all that changes. And the fact that DX has to be enlarged 1.5x more than FX, to see the same size final image.
Cropping any image smaller gives it a telephoto look. Just zooming in more in your photo editor shows this. Same thing, just a crop.
A longer lens is a more narrow view.
A smaller sensor crop is a more narrow view.
The crop will have fewer pixels, but they look pretty much alike.
See
Camera Sensor Crop Factor and Equivalent Lens Focal Length
The marked focal length applies to infinity focus. If focused up close, then the focal length has to change from what is marked. All lenses must do that ,but they vary a bit in what they do, esp zooms.