Bought older home where tenants took various lighting fixtures with them. One was one of the hall lights. Where this fixture was there are three separate 12/2 with ground coming into it. Inside the ceiling box is the following - two black wires are together with wire nuts, a black and white wire are wire nutted together, and there are two white wires that are loose, but the way they are sorted twisted at the end, I'm thinking at one time they were wire nutted together. I'm trying to find out which wires to connect the white and black wires from new fixture to. I'm assuming that since there is a light switch at each end of the hallway, you should be able to turn on/off both lights at the same time from either light switch.
It sounds like a 3 way switch setup, use caution when working with 3 ways because there can be power and the light is off (no return path)and you can get shocked by providing a path to ground. I would start with the 2 loose white wires that are twisted connecting them to the new fixture black and white. then checking positions of switches that is the most likely solution. I have seen 3 ways wired dozens of different ways and this is one.