Do your self a favor and cut out the whole T and hub below it and replace it with a PVC T, pipe and use banded couplings to connect it to the existing pipe. Get as close to the floor while leaving enough pipe to do the job and then a little more incase you make a mistake. I would also replace as much of the vent pipe as you can also. Be carefull when you cut the pipe it may need to be supported, looks like 2". You could also install a C/O maybe in the room behind the sink if it's not going to be finished.
You will be way ahead of the game if you do.