If I understand your question correctly, you can just do this when the button click:
<script>
function goBack()
{
window.history.go(-2)
}
</script>
<body>
<button onclick="goBack()">Go Back 2 Pages</button>
</body>
This was directly from example of w3school http://www.w3schools.com/jsref/met_his_go.asp