0.0c.
In the first case we are finding the velocity between A and B as measured by A or B, so the directions of the velocities must be taken as measured by which of the two we are making the measurement from.
In the case of A we get:
The Earth is moving to the right relative to A and B is moving to the right relative to the. If we assign motion to the right as positive then both u and v are positive.
In your second scene The Earth, as measured from A is moving to to the Left while B is still moving to the right relative to the Earth, for A, the scene looks like.
<--Earth---------------------------A
0.9c
-------------------------------------B-->
0.9c
u is -0.9c and v is 0.9c
Which yields (-0.9c)+0.9c)/(1+(-(0.9c)(0.9c)/c^2) = 0c
Third scene We will look at it from the rest frame for A where you get:
0.9c
<--Earth-----------------A
|
|
|
\/ B
Since the Earth-B pair share a 0.9c to the left velocity, this pair is time dilated by a factor of 0.436 as measured by A. This includes the vertical speed of B with respect to the Earth. That means that B vertical speed component is 0.392c (which is why I drew the Earth-B line shorter than the Earth-A line.
Now we can just do vector velocity addition to get sqrt ((0.9c)^2+ (0.392c)^2) = 0.9817c