Merger of two railways to be completed by the end of this year