I spent hours looking for information on how to setup transactional replication with updatable subscribers while also using database mirroring. I found some articles that were very helpful but also very confusing.
In the provided script I describe the six steps to successfully setup replication when using mirroring. I like to split the script up into six independent scripts so I can run each of them on the proper servers, so that is where I would start. Once you determine which servers are your distributor, your principal publisher, your mirror publisher and subscriber, the comments section of each script will help you determine where to run them. Just be sure to pay special attention to the variables in each script so you can insert your own values. And as always, you should be aware of the potential performance impact of starting the initial snapshot in production during business hours.
FYI: The script assumes that you already have mirroring setup properly and have tested failover.
Helpful Article I Read: