This isn't something that is easy to do with DNN, you'll need to setup a database task/service that keeps the users, user portals, roles, and ASPNET_ tables in sync across the two installs.
That, or you will need to write a custom authentication provider for both DNN 5 and DNN 7 that use an different database to store user information.