What should the company headquarters do and how to connect the branches' networks? What will be the cost?

Can you simply need intranet files to enjoy it? As long as there is a path on the WAN, both parties can access the Internet. If both parties are optical fibers or private lines, you can directly enter the ip address. Otherwise, they can map nat routing tables, which is very simple and supported by many tools.