I'm working off of memory here but I remember encountering this problem, myself. I'm fairly certain that the key is to say "goodbye" to her after your first meeting. In doing so, you suggest to Tanya to keep your meeting a secret. Otherwise she'll talk to Katrina about it, who will tell Tanya that you're trying to kill her, leading to the hug of death. In a Quest for Glory game it always pays to be polite.
Unfortunately, if you forget to tick that option in the dialogue box then you're setting yourself up for failure without any way to turn it around. So your only option is to load a save from before you first entered Castle Borgov or otherwise to start from the beginning.