We consider two configurations of a random directed polymer of length L confined to a plane and ending in two points separated by 2u. Defining the mean free-energy F[over ] and the free-energy difference F;{'} of the two configurations, we determine the joint distribution function P(L,u)(F[over ],F(')) using the replica approach. We find that for large L and large negative free energies F[over ], the joint distribution function factorizes into longitudinal [P(L,u)(F[over ])] and transverse [P(u)(F('))] components, which furthermore coincide with results obtained previously via different independent routes.