A.P. Moller-Maersk A/S, the world’s No. 2 container carrier, signed an agreement with Vietnamese conglomerate Hateco to develop a $3.5 billion railway container terminal network in northern Vietnam during President To Lam’s official visit to Denmark.