Translation:I borrowed a pencil from Ms. Tanaka.
In Japanese the -san honorific means mr., mrs., or ms. As such you cannot tell the sex of the person by mentioning their name. Some Japanese names are exlusively female or male whereas some names can be both male and female (in some cases they may have different kanji in some, like in our case, they may have same kanji.)
I have a question for native English speakers, especially Americans. I imagine that this sentence could be said by a student in a school. Someone had borrowed a pencil from a classmate. The thing I'm interested in is if natives address their fellow students as mister, miss etc. Could this perhaps be a thing when speaking about a third person (with the same social standing)?
If American and/or other natives don't practice such formality with each other, Duolingo should accept omitting mr., mrs. or ms. That's what I did. I lost a heart.
As someone who has spent half his life in Japan, I would suggest that -san not be translated but just left as is. Teachers are referred to as ~~Sensei, not ~~san. Principals are referred to as "~~Kochosensei". Girl students will probably refer to boy students as ~~san, or maybe ~~kun, while boys will refer to each other as ~~kun, or occasionally ~san. But American students would never call each other "Mr.", "Ms.", etc. It just sounds odd.
I attended American and Canadian schools for about 20 years, and I have also been a student at a Japanese university. American and Canadian students don't address each other as "Mr." or Ms.", period. That would sound really odd. However, Japanese students address each other as "~san" or "~kun", and occasionally as "~chan" especially among lovers. Japanese apparently don't feel comfortable addressing non-family members without some kind of honorific title, while American and Canadian students don't need to use a title. In my dealings with Japanese, both as a student and as a "shakaijin", it ends up that people who know me address me as "~san", instead of "Mr.", even when we are communicating in English. So I suggest that "~san" not be translated but be left as is, with an explanation about its usages.
Good question. The answer should come from a native Japanese speaker. But I'll bet you are right. "Ni" generally indicates some indirect relation to the verb. The translation depends largely on the semantic value of the verb and can be any of several English prepositions.