1.) Typically we call it a pen cap and leave it at that. I would definitely say the answer is "This is the lid of a pen." because it's clear you're referencing a specific one. "This" definitely seems to necessitate it to my ear.
2.) Definitely "These are the seeds of apples." Same reason. But we typically call them apple seeds. "These are apple seeds."
3.) I reject both sentences in my ear. "These are ten apple seeds." That's the only way I can read it.
English is a big user of what is called "attributive nouns": where in another language you would have to use "of" to describe something as belonging to another noun (e.g. the tire of a car, the door of a garage), English just puts the noun after the of in front of the noun it's modifying: "car tire", "garage door".
This is pretty much how we always do it. We rarely use of in this case.
^ might help. You may try looking in a Vietnamese source for explanations.