The simulation can be modelled as a transformation on the original text taking the result of Problem 2 as an input for the transformation.
Subproblems:
Resolve the original text being modified.
Find the location in the original text based on the location information.
Apply the action and operands.
Create a rendition of the result.