how to orient of Z-local-axis through a given Point
You could just assign a Damped Track constraint to object 'A'. (You can set any axis to track the target)..



If at some stage you want to remove the constraint but leave 'A' in place, you can CtrlA > 'Apply Visual Transforms'