How can I animate specific views?

I want to animate Bloc A to slide up and Bloc B to slide down when I move from Activity 1 to Activity 2

Can someone bring me a solution for this ? Thanks a lot for your help

Here’s an illustration of what I want :

enter image description here

How can I animate specific views?