[moved to MetaMod forum]
You can do this very easily with Chameleon, but with a few lines of code you can do this with (free) MetaMod as well.
1 - create a new rule that "detects session variable A" in the conditions (use the dropdown), AND detects the exact page 'A'. This might be via the URL selector, or the menu item selector, or via the article selector that can detect a certain article by id number... whatever works best for you.
2 - In the "SUCCEED action", use the redirect dropdown to redirect to page 'B'.
3 - create a second rule that detects the exact page 'A' using the same selectors in the 1st rule, except don't do the "detect session variable A" thing.
4 - in the SUCCEED action in the 2nd rule, use the dropdown to "Set session variable A".
Ok, so here's how it works: the each time a user views a page, rule 1 gets triggered. It checks to see if the user is on page 'A', AND that session variable A. So if the user is not on that page, or is on that page for the 1st time, it won't redirect, but goes on to the next rule.
Rule 2 checks to see if the user is visiting page 'A'. If s/he is, then the session variable gets set.
Now that the session variable is set, the next time the user goes back to page 'A', it will trigger the redirect.
How to do this with MetaMod:
1 - make a new MetaMod module and assign it to an inconspicuous position e.g. in the footer or someplace like that. It won't have any output, but can sometimes still affect the layout.
2 - in the PHP code of the MetaMod, use the following. This recipe detects the page via URL, but you can change that if you like.