Rotate an Object from Point A to B

sorry, i don’t have a working example. i have never made anything like this before, and i’ve never used quanternions either. i was figuring it out and typing it out as i was also in the middle of talking to someone IRL about something completely unrelated, solving 2 complicated problems at once to challenge myself. so i have no idea how i came up with that, and ill be really surprised if it works. but it sounds legit, because cross product should give a perpendicular axis and i think quanternions rotate around a vector, using W as the angle, but im not sure, its all just flashbacks from random vector math books i have read. so good luck.