Jay, each state’s foreclosure laws are unique. This is the first place to turn…learn your stat’s foreclosure laws. Also, I’m not an attorney or a CPA.
That said, in Georgia the 2nd would be foreclosing subject to the first. If you discover the borrower on 1st position mortgage or security deed is in default (not taking care of the property, not paying insurance or property taxes, not making timely, in-full payments, etc., you can foreclose. When you foreclose the second (property owner after they foreclose) is wiped out at your foreclosure.
In this matter I’d most definitely hire a real estate attorney in your state (the state where the property is) for a consult.
Hope this helps.
Bill Cook