If I understand correctly, what you are looking for is not to stop the user from pressing the back button, but to stop them from pressing "back" from A and seeing the settings they saved in page B?
If this is correct, there are two ways you could achieve this - first and easiest is to not navigate from B back to A, simply use the BackPage method on the HistoryOrientedPageSession after you've saved the settings changes. This will take B off the stack just as pressing back would.
If you have more than one page in your settings, then you can override one of the GoToPage methods on the HistoryOrientedPageSession by creating a new class and inheriting from HistoryOrientedPageSession. This then exposes an override with a boolean value for "add to stack" - set this to false and the page you navigate from doesn't get put on the stack. Use this to navigate from B to A and B will never get put on the stack, so can't be navigated back to. See the Q sample app in the SDK for implementation details.
Cheers,
Andrew