Let's say I have Activity A and Activity B.
In A, I have a button which when clicked runs the following code
startActivity(new Intent(this, ActivityB.class));
startActivity(new Intent(this, ActivityA.class));
if(activity has already started)
yes, your assumption is right android is capable of managing these activities and they are maintains proper stack for it.
if you are having only two activities you can use singletop launcher mode so that only only two activities remain in stack.