Dearest DATVT,
My suggestion for you does not involve code at all. You just need to add an html link to your form and make it look like a button. For example, use the characters "<<" and make them really large and bold. Then, associate the URL for the webpage that you want to navigate back to. When they click the "<<" label it navigates back to the previous page. You can also hook this up to work on a button press, but it's slightly more complicated.
I'm really sorry, but we don't provide sample code anymore to people for specific problems. We just have too many requests and if we responded to all of them we would have no time to actually do paid work. Instead, we give general best practice and guidance to people for free. If there is a coding problem that is general, we may help debug it and offer suggestons, but we don't write code for people. Also, code is a bad practice for InfoPath.
Best of luck in life,