by Luis de Vasconcelos.
Yes, first upgrade the two instances of Moodle to the same version.
When you create the course backups there's an option to include user data. If you select that option then your user data will be included in the backup files. Those users will be created on the instance of Moodle where you restore those backups too if they don't already exist.