Full Synchronisation Requirement - Do not kill anyone
Climb up the buildings to the right of where you start, and make your way along the beams that Ezio so pointedly looked at in the cutscene. Hug the right wall and follow the staircases deeper into the restricted areas. When you reach the checkpoint marker, a cutscene will play.
Afterwards, head back the way you came and head to the search area. When you get there, turn on Eagle Sense and keep moving in a north-westerly direction. You’ll run into a large group of people watching a brawl on the street. The Templar guard you want is the one furthest to the left if you’re looking at the crowd from behind them. Enter the crowd and fast walk past him to pickpocket him, then turn and run for safety as fast as you can.
Make your way back to the prison/cave, making sure to not get detected by the riflemen (or at least, to not kill or harm anyone!). When you get back inside and find the cell door at the end of the room, interact to free the prisoner and end the Memory.