Upper drain tube is connected but bottom is not? How do you replace/fix tube? on 2004 Toyota RAV4

I need to replace the right hand drain tube on my sunroof but can't find where it comes out at. I have traced it all the way down to just above do I get to the piece that drains out near wheel? Pictures? Help?

Asked by for the 2004 Toyota RAV4