When I am outside trying to train my dog to sit and stay I will try and back up further every time to try and increase the amount of time and distance that he stays. When I want him to come I then say come and give him a treat. However, when I get too far or he gets bored, I guess, he does not stay sitting anymore and will go focus on something else or just come to me. What should I try doing to help with this?
Also, I want to be able to be outside with him and having him sty in one place until I tell him to come, how can I get him to stay in one place for an extended period of time, even if someone comes into the yard or house?
First of all, how old is your dog and how long have you been training him?
All you need is "practice" "practice" "practice". It is pretty advanced expectation for your dog to stay still despite of all the distraction.
When you teach dogs to stay, start from inside the house; command in front of the dog, and for a short period of time, then release him by saying "all done!" or something like that. If you don't release him from the stay command, he will not know when he can do something else, or go somewhere else and he will end up deciding when he can stop "staying" himself. This is not good. So, make sure you will release him from the stay command.
As you practice the command where there is less distraction, you can now add more time (longer stay) then you will remove yourself further and further from him. This process will take a while depending on your dog's attention span. Make sure he will succeed every time, otherwise, he will learn it's OK not to perform as you tell him to do.
It is challenging to add those 3Ds to his stay. 3Ds means Distance, Duration and Distraction. Don't add all of them at once. You will need to add them gradually. Maybe the most difficult stay might be in the dog park, because there is a lot of distraction. Let us know how it goes.
I'm not a trainer, but i would not use the sit/stay and then tell him to come. sit/stay means just that, you would go back to him and "release" him at that time.
you should use sit/wait command, wait means dont do anything else till i tell you to. i use the sit/wait command when going out or in the house, then i walk through the door, stop, then say come.
keep practicing, you will get it, it took me awhile. I can have my Zeus (doberman) sit/stay, then i walk around the house going into different rooms and he stays there. i even practice the sit/wait the same way, but i say come and he finds me.