It's obvious that he still had feelings for her. It's also obvious that he doesn't want to lose her or you so if he tells her he dates you now then she will leave and if he tells you that he prefers her then you will leave. My tips to you, leave him. He can't have both of you. If you stay, he'll continue to play games with both of you. Until one of you threaten to leave, that's when he'll choose who he wants.