Complex sentence: He then left the Hanumandhoka palace and went to British residency and when denied talks with the resident at such late hour, went to Narayanhiti palace.
Split into simpler sentences: He then left the Hanumandhoka palace and went to the British residency. When he was denied an audience with the resident at such a late hour, he went to Narayanhiti Palace.