I find it easier to transfer logins via dbatools.io Copy-SQLLogin cmdlet if PowerShell is an option or sp_help_revlogin if not.
The Copy-SQLLogin cmdlet is a much easier approach and that link even has a video to help you step through the process, but again, if PowerShell isn't an option and you need to go the sp_help_revlogin route, make sure you execute that stored procedure (after you create via the linked article) on ServerA, copy the login statements over to ServerB and run the statement(s) there.
If you get an error, you may need to drop the existing user from ServerB first so that you can sync up the SIDs.
Finally, if you're running SQL 2012 or later, you may be able to configure your database to be a partially contained database instead. This will short-circuit things so the security is transferred with the backup as security is handled at the database level and not at the instance level. There are limitations to using partially contained databases, so review those first if you feel like this may be the approach you wish to take instead.