A Sydney court has heard a prominent real estate agent tried to kiss and strangle his girlfriend before attacking her friend with a samurai sword.