Not necessarily enemies to friends, more like a friendship that under normal circumstances would never happen but are join but unusual circumstances.
A good of example for what I am talking about is Project Hail Mary by Andy Weir. In these book, the main characters would have never met in any circumstance but because they are both have the same purpose and they are both scientists. They are forced to interact and eventually become friends.
by juliO_051998