They didn't. The Netherlands and Britain divided the island between themselves in 1891, with the Netherlands getting those parts that were not already a part of the British empire. James Brooke, a British adventurer had made himself useful to the sultan of Brunei, who made him Rajah of Serawak in 1844, in 1888 the area became part of the British Empire.
As successor states, Malaysia and Indonesia inherited the existing borders.