Temari belonged to the 4th Squad which is under Gaara.
At some point during the war, the 4th squad was divided into two groups.
The First group (Reinforcement) was headed by Shikamaru.
And the Second group (were Temari was in) was headed by Gaara.
When Gaara's group fought Madara the whole unit was annihilated.
There were only few survivors, Temari was among them.
When the RubberGuy went on with other Konoha Ninjas to Fight the 2nd Tsuchikage, Temari stayed together with the 5 Kages.
When Madara used the Flower Tree World Technique, the 5 Kages flew to safety but
Temari was no were to be found. The RubberGuy together with the other Konoha Ninjas are still pursuing 2nd Tsuchikage.
And when the Edo Tensei is dispelled, Temari is still nowhere in sight.
And still no sign Temari.
But when the other half of the 4th squad headed by Shikamaru arrived at Naruto's location, guess who's there?
I'm just wonderin how did Temari ended up there when she's supposed to be with Gaara.
Any Ideas?