From Middle English inmost, from Old English innemest, a double superlative form from inne (“within”), from in (“in”). The modern form is due to confusion with most.
Practice speaking and memorizing "inmost" and many other words and sentences in English.