I have the red vector A which is the vector I want to rotate,

and the reference black vector R. which is the reference I want to use for the rotation

I want to give a new value for black vector R and make sure that A is correctly rotated to match the new R

This happens on the XZ axis

The expected workflow is that for example I start with A(-8,0,0), R(0,0,-1)

I manually change R to (1,0,0)

And I am expecting an new output for A of (0,0,-8)

How can I achieve this?

Any help is appreciated ,thanks!