The issue you are experiencing is due to poorly adjusted derailleurs. SRAM X5 is a solid group -- right in line with the Deore level on the other bike.
If you want to adjust the rear derailleur yourself, check out the repair section at
www.parktool.com.
Also worth noting, the derailleur hanger may need to be adjusted for optimal shifting. This is something that requires a specialty tool. Derailleur hanger alignment should be checked on a new bike build, but that may have not been addressed.