Your (1) and (2) would function the same most of the time. But if I try, I think I can imagine a context where they would mean slightly different things.
(1) I'm telling someone an anecdote, about something that happened to me. I'm far from home when I tell this story. Let's say the story starts out in a town not far from my own -- let's call it Jackson. At a certain point in my story, the listener needs to know that the town where I live isn't far from Jackson. Maybe there's going to be a dramatic car ride to go pick up some item that is urgently needed in time for a concert that's going to start shortly. Let's say the item was in a suitcase that the airlines have misplaced. To explain that my town isn't far from Jackson, I say, "I live in a nearby town. So I jumped in my car and drove home as fast as I could. I grabbed my copy of the score of Beethoven's Fifth and raced back to the concert hall in Jackson, arriving just as the orchestra was tuning."
(2) Note that this sentence wouldn't work in the story about the dramatic car ride.
Moving on. In (A), "nearby" is describing "restaurant;" since "restaurant" is a noun, "nearby" functions as an adjective in this sentence. In (B), "nearby" tells us where you live. Therefore it functions as an adverb in this sentence.
(C): adverb; (D): adjective; same analysis as for (A) and (B).
To get better at distinguishing between adjectives and adverbs, I recommend that you start by practicing with simple sentences. Use a different symbol to indicate each one -- for example, circle the adjectives, and underline the adverbs. You could even use different colors. BUT before you do that, you should get completely solid on identifying NOUNS and VERBS. When you can do that comfortably and easily, the adjectives and adverbs will jump off the page at you, for the most part.
Do you have a teacher who can check your exercises?
If something is propped up or propped against, it is neither horizontal nor vertical, but diagonal.
- If you want to emphazise the not horizontal aspect, the "supported from below", use
propped up
- If you want to emphazise the not vertical aspect, the "leaning against", use
propped against
So the old man from your example is described as either supported by the pillows ("p. up") or leaning against the pillows ("p. against") - both can describe the same scenario but with a slightly different perception.
In general, I would tend to favour "against" for more vertical objects (a painting propped against the wall), but this is no fixed rule.
Best Answer
Both are correct. "By" indicates a greater degree of closeness than "near". You could replace "by" with "next to" without any loss of meaning.