Forcing a point on an object to face another object

I’m setting up a system so that the player can click on a specific point on an object (Object A, we’ll call it), then click on a specific point on another object (Object B) and have Object A rotate itself in such a way that the point you clicked on on Object A faces the point you clicked on on Object B.

I have everything down to make this system work perfectly, except figuring out how to properly rotate it. I save the point you click on Object A with a temporary vector, based on the location of the trace - the location of it’s owner, which is then unrotated by the rotation of it’s owner.

The difficulty is that I don’t know how to rotate the object in this way. I have the hit result from the first trace against Object A as well as the hit result for the second trace, against Object B. Does anyone know what math functions I should use to generate the rotator that accomplish this?