Answer:
'Wie geht es Ihnen?' means how are you in German for a teacher because it is more formal than 'dir'.
'Wie geht es dir?' means how are you in German for a friend.
Step-by-step explanation:
I speak a bit of German and always ask that to a friend who speaks German and she never corrected me so I think it is right.
Hope this helps!