>>125432 (OP)
Shift the vector, scale and then rotate?
Shift: B-A = <b1-a1, b2-a2>
Scale: |B| / |A|
Rotate: θ = arccos(a ⋅ b / (|a|*|b|))
Not a clue how to perform the point shift operations mathematically, but I'm sure these 3 are in there somewhere.