As GG said.Would this be caused by a flat battery in the key fob or the car battery itself, or both?
It'll be the vehicle battery. The Freelander like all modern vehicles uses battery power all the time, even when it's not doing anything. I'd expect a fully charged battery to discharge in a couple of months of non use, so if this vehicle hasn't been used for 2 years, the battery will likely be beyond charging, as lead acid batteries don't like to be left in a discharged state.
I'd simply buy a new battery, and weight the old new one in.
The fob could well still work, as the fob only uses battery power when the buttons are pressed, and those 2032 lithium coin cells last about a decade if not used.
The battery in the fob isn't needed for the immobiliser anyway, so it would still start ok, even if the fob was flat.
When you fit a new vehicle battery, the rear door window will go fully down, so will need recalibration.
This is as simple as putting the key in and tuning to get the ignition on, then pressing and holding the rear window up button until the window is fully up and stops, when you might hear a quiet click from the relay in the back.
The engine should then start.