how do creat Rack and Pinion Sub-Assembly in insert main assembly

hello sir

                  i creat a rack and pinion assembly  with mate but  this assembly in put the second assembly  and creat the flexible the mate problem creat  ihaving a lots of tray but this prolem not solve plz help how do creat the rack and pinion assembly wthout problem insert other assembly with flexible

SolidworksAssemblies