I run into this problem fairly often. You have a few options.
The best: merge the two databases to have one truly unified database with one password. This requires clear communication to the customer so they know what is going on and that one of their passwords will go away, but once it is done, they only have 1 password to know, not 2. This is stronger branding for the parent brand too.
You can write your own lazy migration tool using a custom DB connection to migrate into a single DB, and it would try the password against both legacy connections. Again, the customer ends up with a single password.
You can write a custom DB connection that tries both legacy connections. This isn’t a true unified database, as behind the scenes there are two DBs.