On top of the side beams is fine.

Using 2 separate extrusions for the gantry is a lot weaker than one big one. If you already have them, it is worthwhile using a plate on the back to join the two gantry extrusions.