Directory calculation
Retina, 44 bytes

+`.+ /| |/\.?/
/
+1`/?[^/]*/\.\.|/\.?$

^$
/


Input is expected to be the two paths separated by a single space.

Try it online! (The first line enables a linefeed-separated test suite.)