Jeff is correct - while MS-DOS was purchased (mostly, I'm sure they did some polish on it) it wasn't bought from Apple. In fact the Apple DOS was not invented until the Disk II drive was released. Prior to the Disk II, Apple II's read programs from (wait for it) a CASSETTE tape drive! Just a plain old cassette drive.
When the Disk II was released Apple realized there was no native support for it, so the Disk Operating System (literally, a system for operating the disk drive) was released along with it.
And yes, CP/M was already in existence (I actually worked for a company that used Apple II's with Z80 processor cards installed so they could run CP/M) and almost all of MS-DOS's commands are, quite literally, the same, including the backward slash in path names.
ProDOS was never used on Macs, the Mac OS (System 1) was created for the Mac. However, ProDOS was the basis for GSOS, the Mac-style OS that the Apple II GS ran.
I was lucky enough to be there when the Apple II, IIGS and Mac were first sold and experienced most of this stuff first hand. 🙂