The absolutely simplest way:
First:
Move and reference zero for part 1.
Then:
Move and reference other zero.
You could then copy-and-paste the inner part of the program (if the part is the same,) or the second half of the program (if you're doing top/bottom,) making it go to G54 the first time (simply by running G54) and the go to G55 the second time (by running G55.)
Beware that the "safe line" in the program code you copy may include G54, which you'll have to remove or change go G55 as appropriate.
Then your program will look like:
Code:
G54
(youre now back in the G54 coordinate space)
G0 X0 Y0 Z4
(goes back to starting position in G54)
(then your part code goes here)
G55
(youre now in the G55 space)
G0 X0 Y0 Z4
(goes to starting position in G55)
(then your other part code goes here)