Life Here on Voyager
They keep it under wraps for three years and nine months, and then Tom tries to be nice to Seven of Nine, and everything falls apart.
Later, Tom will blame Harry. The computer tells Seven that Tom's in Junction 32-B so that's where she goes, to confirm his offer of friendship contained no romantic subtext. The computer doesn't tell Seven that he's not alone, Janeway perched on a console with her head thrown back and Tom between her thighs.
Seven promptly asks the Doctor to explain what she witnessed, and after three years, nine months, and one day, everybody knows.