So you presumably have a QuickTime file that you exported from FCPX. That is a single file that contains both audio and video.
In Compressor, create a job and bring that file into the source well of the Batch window.
Create a setting that is identical to the format of your exported file. (For example, if you have a 720P 30 fps Pro Res file, duplicate one of the Pro Res settings and check in the Inspector to make sure that all is the same because the ONLY thing you're going to ask Compressor to do is insert chapter markers.)
In the Preview window, set your markers. Submit.
Take the new file (again, a 720P PR file in my example) and, after choosing a theme, drag it into a iDVD menu window. Click on the iDVD preview icon and check to verify that your chapters were successfully imported with your movie.