Accessing the pipe is usually the hardest part. You can use No-hub or Fernco connectors to install a new portion of pipe. Your situation is one of the reasons to have a Home Inspection done before buying. If the leak is bad, the previous owners may have known about it and should have put it in the Disclosure form. This could throw the cost of repair back to them. Check with your Realtor about this.
If you have never made a mistake, you haven't done much.