Poor editing or a continuity mistake... Seems like opinions differ. I guess depending on what happens in the off-screen moments... both are possible. That being said, there's several continuity mistakes in the movie, so it may very well be the case with this as well.
-
Firstly: Continuity mistake. IMDB has this under their 'Goofs' section.
##Goofs## ###Continuity### When Gordon is taken by Bane's men and put on 'trial', it is shown that Bane takes Miranda hostage. However, a later scene shows Bruce meeting Miranda and Fox, neither are hostages. Later still, when he first appears before Gordon, Batman asks where Miranda is, despite seeing her as Bruce Wayne in a previous scene.
IMDB page can be found here.
-
Or secondly: Poor editing
From the user Vadersville on the empireonline website:
"Bruce sees Miranda when he is brought before Lucius and tells her he'll come back for her. He and Lucius are then taken away with Selina. Lucius and Bruce go off to get him armed up whilst Miranda and Gordon and his men are taken before Crane in the court and sentenced to death by exile. Bane tells the guards to bring Miranda to him and leaves with her. Bruce then rescues Gordon but Miranda isn't there so he asks where she is. Where is the error?"
Page can be found here.