For recording a play either participates in, use the position they were in when the pitch is thrown. It only really matters if you're trying to compile defensive stats for a team, to make sure you properly credit putouts. What you write depends on the scorebook you're using. Some scorebooks have two or three rows per batting order position, to write substitutes, and you could use the position column of the 2nd (or 3rd) line to write their new position.
At least for me, the Look Inside! feature on Amazon for Andres Wirkmaa's book shows page 17, where there's an example scorecard with position switches. It doesn't have rows but has a large enough space to enter substitutes. In this scorecard, the inning where the switch happened is put in parenthesis, for example (T8) for Top of Eighth.