Alt + . – use the last word of the previous command.
$ cp file.txt /some/annoyingly/deep/target/directory/other.txt
$ cd then press Alt + .
$ pwd # => /some/annoyingly/deep/target/directory