Ask for an anime movie, here is the information. The story seems to be that a girl crossed into a male school, and the male called her senior, and later called that girl.
What you said is not quite right. The man invented the space-time machine, and the woman is older than him. He wanted to travel to the first two years, as old as that woman, but that woman took the machine away. Two years later, it was all for their age.
The name is: G?sh? Aoyama's Short Stories-Wait for me.