Make a solid push another solid
The sourceRectAtTime(n) method does what it says on the tin: returns the dimensions of the source of a layer, at comp time n. So because the source of your layer is 1920px wide, it returns 1920.

You want to be using another method, the toComp layer space transform. It returns the comp co-ordinates of a point in layer co-ordinates. To find where the top right (in layer co-ordinates it will be [0,0]) of a layer is you'd do

thisComp.layer("theLayerName").toComp([0,0]);


To find where the anchor point of a layer is in comp co-ordinates:

let theLayer = thisComp.layer("theLayerName");
theLayer.toComp(theLayer.anchorPoint);


The really useful thing about toComp is that it works regardless of the parent chains that the layer may be connected to, and any transformations that have been applied.

To apply it to your case apply this to the red's position property:

let white = thisComp.layer("white");
let red = thisComp.layer("red");
let sRect = white.sourceRectAtTime(time, true);
let offset = white.toComp(sRect.width, sRect.top); //top right of the white layer
value + offset; 


value in the last line is a property that returns the currently set value of the layer property, after keyframes. So this will add the offset to whatever the position currently is.

There is no need to use time-white.inPoint when calculating sourceRectAtTime because that method expects comp time as the first parameter, not layer time.