A new deal will see a locomotive exchange between the Severn Valley Railway and the Vale of Rheidol Railway.