A pair of community banks plan to merge to form a new bank with four branches and about $900 million in total assets.