The best way to look at these is to try to visualize the problem. Car B is moving in the same direction, so we automatically know that car B should be moving slower in the frame of car A than it is in the stationary (groud based) frame. Let that be your guide:

v = 70 mph - 62 mph = 8 mph

If you really want the formulae then I have to introduce some variables for you. Let us have two people: Stacy and Moe, and one moving object. We're going to put Stacy in the "stationary" frame, that is the one that isn't moving relative to the ground. We're going to assume Moe ("moving" frame) is moving at a constant velocity v (according to Stacy) relative to Stacy in the stationary frame.

Let the object be moving at a velocity vS according to Stacy and moving at velocity vM according to Moe.

Then

vS = vM + v

Note that these are all velocities and hence vector quantities, so this is a vector addition.

To apply this to your car problem, car B is your object, car A is Moe. Calling the direction of car A relative to the ground to be positive we have:

v = 62 mph (the velocity of car A relative to the ground)

vS = 70 mph (the velocity of car B relative to the ground)

vM = ? (the velocity of car B relative to car A)

vS = vM + v

70 mph = vM + 62 mph

vM = 70 mph - 62 mph = 8 mph

as I stated earlier.

-Dan