These are basically fixed constructions in English. You are friends with someone. Note the -s! Also, the with is not optional.
You are free to use whom or leave it out. Who is technically not correct in this case. Not everybody will consider it incorrect if you use who, though.
These sentences are all correct, read them carefully to understand how they are different and how they are similar:
These are people who are my friends.
These are people I am friends with.
These are people with whom I am friends.
People I am friends with, should be...
People with whom I am friends should be...
People whom I am friends with should be...
As for you other sentences, the verbs date and move in are not used in a similar way, so you cannot use them in a similar sentence! You date someone (not with someone), but you move in with someone (moving in someone would be possible, but it is a very graphical description that you might want to keep to yourself unless you are a baby moving inside your mother!)
She is not the kind of girl I would date.
She is not the kind of girl I would move in with.
(A small issue that doesn't relate to the grammaticality: it seems unnatural to me to use a defining relative clause after a proper noun, at least in this particular sentence. So I'm going to use commas before the relative clauses in all of the sentences that I discuss.)
Like any other clause, a relative clause generally needs a subject. In your sentence (2), "I gave John the book," "I" is the subject. If it were possible to form a relative clause with the same grammatical structure as sentence (2), it would be as follows:
- ?He saw John, whom I gave the book.
This sounds (barely) grammatical to me, but I expect many other people would find it ungrammatical. I don't think a native speaker would ever prefer this over an alternative formed from "I gave the book to John":
- He saw John, to whom I gave the book.
- He saw John, who(m) I gave the book to.
Sentence (3) might be a marginal case like "Whom did you give the book?": as far as I could determine, all native speakers agree that the preceding sentence sounds bad, but there is disagreement about whether it is outright ungrammatical.
It took some searching through a number of examples of "to whom I gave [direct object]" for me to find one example of "whom I gave [direct object]" in Google Books:
Next morning I found many men and women dead, whom I gave water last
night. (Hiroshima, by John Hersey)
Passive-voice versions of ditransitive verbs
In your proposed sentence "He saw John whom the book was given," you've removed the original subject of the sentence, the pronoun "I." But as I mentioned previously, the relative clause is required to have a subject.
The subject can't be "whom," as that is an object pronoun. The only remaining noun phrase is "the book." This is an object in your sentence (2). So your proposed sentence would have to use a passive voice structure, where the relative clause corresponds to an independent sentence like the following:
- *The book was given John.
This kind of passive voice is disfavored in present-day English: it sounds archaic at best, and just wrong at worst.
In general, people only use the following passive forms for ditransitive verbs:
- The book was given to John.
- John was given the book.
So it would be grammatical to say either of the following:
- He saw John, to whom the book was given.
- He saw John, who was given the book.
Best Answer
Who is the "subjective" form (also called the nominative). Whom was originally the "objective" form (also called the accusative, but including what in other languages is called the dative as well). However, whom is increasingly replaced by who, especially in less-formal contexts.
The thing to understand is that while both the use of "whom" in the objective case and the avoidance of sentence-final prepositions are often seen in formal use, English isn't divided into two simple formal and informal registers.
Both "who[m]... with" and "with who" (which is unusual, but certainly permissible) could be considered as lowering the degree of formality , yet neither is as informal as it's possible to be. Both might be considered more formal than informal in some contexts.