Android Popping off the Activity Stack
Use the android:noHistory property in the manifest:
http://developer.android.com/guide/topics/manifest/activity-element.html
If A is already running, you can use the FLAG_ACTIVITY_CLEAR_TOP flag when starting an intent to go back to A.
See also, similar questions:
How to clear current activities in the stack?
how to kill sub activities and bring activity to top of stack