Amtrak has reached a preliminary agreement to move to the Pennsylvania Station annex planned for the James A. Farley Post Office Building, officials said yesterday. The agreement, reached after lengthy negotiations, would remove one of the most significant stumbling blocks for the Moynihan Station project: Amtrak remaining in its current location. The project aims to expand Penn Station with an annex in the post office building and create a more visible entrance to the station, which is below Madison Square Garden. In exchange for moving, Amtrak will receive some of the revenue from retail stores in the expanded station, though the details of the arrangement have not yet been fully decided. The project is likely to cost $1.1 billion to $1.5 billion, Senator Charles Schumer, an advocate of the renovations, said.