A is more correct. Most people would also shift the two models in the top right over a little to the left as well. It’s a squash-them-in concept where you try to keep the unit tight together.
Personally, I’d shift the whole of the back three ranks back so they were in line with the back of the cavalry base (level with the shifted file in diagram A). That way, everyone is level and there’s just a small gap between the second and third ranks.
I tend not to do this (at all that is), but I’d say it might be best to have only one file of models next to the model, to make life simpler. Then, if preferable (to make life easier), I’d change the rank width But, if ya don’t want to do that, I believe that A is correct.
When I have a mounted unit in an infantry block I usually just consider the mounted model to be on a 20x40 base (in other words taking the place of two infantry models, although not for rank calculation purposes).
I physically achieve this by having the edge of the cav base sitting on top of the edges of the surrounding infantry bases and the movement tray.