This is definitely 158707, and I believe it had just arrived in Waverley from Tweedbank on 4th August 2017. Others more local may correct me.
Location: Edinburgh Waverley
Original line: Edinburgh and Glasgow Railway
Photographer: Ken Strachan
Contact photographer: Ken Strachan
Date: 04/08/2017
Image number: 84102