The force on each magnet depends on its magnetic moment and the magnetic field of the other.
(The force on each magnet; depends; on its magnetic moment and the magnetic field of the other)
The force on each magnet
depends
on its magnetic moment and the magnetic field of the other