Words don't usually change in a one-off way. If you see a change from m to w in one word, you're likely to see it in another word in the same language. For example, in going from Proto-Germanic to English there was a general shift to drop the sound n before fricative sounds, as is apparent in multiple words: English five vs. German fünf, English us vs. German uns, English soft vs. German sanft. In the case of mid and with, we don't see other instances of m turning into w. Coupled with the fact that mid and with used to coexist, and they have plausible etymologies arising from independent sources in Proto-Indo-European, the preponderance of the evidence is for independent origins for the two words.