Hewitt went to Germany because his regiment moved there and he had the opportunity to undertake duties which would, hopefully, advance his career. He was to command at tank squadron and the squadron went to the Gulf from Germany. Diana was very angry with him for "letting her down" by leaving her to go where his career took him. She froze him out for a while and didn't return his calls, but then started calling again, and maintained regular contact after one occasion when a girl Hewitt had been seeing answered his phone!
He had the chance to go back to England en route to Canada to observe manoeuvres two squadrons of The Life Guards were performing there. He stayed with Diana at Highgrove then and saw her once more for final goodbyes and declarations of love at the house of a friend before he finally left for the Gulf.
I can't work out precisely where Gilbey fits in to all this. We know they were an item by New Year's Eve 1989, which is soon after Hewitt left for Germany, so she could have been seeing him to spite Hewitt for leaving her alone, but I don't know when the affair with Gilbey started, because as far as I can tell she was seeing a lot of Hewitt in up to the time he left.
They had one phone conversation while he was in the Gulf, a call which he made from
Richard Kay's satellite phone in his hotel. Kay and his photographer had gone out to observe and photograph the work of the Squadron. Hewitt rang his mother and also called Diana. It was during this conversation that Diana told James that she would love to marry him!