How is "Find Look at Rotation" function is implemented?

Could someone gimme this function without dependence on UnrealEngine. Or write steps how to recreate it. I appreciate any help.

thank you, mate