The grammatical role of "dem"
I have encountered the sentence
"Eine Methode, die dem einen sehr hilft, könnte dem anderen Probleme machen."
I have two questions in this regard:
1- I know that the verb "helfen" comes with Dativ object, so "dem einen" should be in Dativ form. But Why "einen" in Akkusativ form?
2- I also don't understand the second "dem". The word "Probleme" is plural, so in Akkusativ form the article should be "die" not "dem".
The sentence structure here is a bit tricky: the phrases used here are "der eine" and "der andere", which in the dative case become "dem einen" and "dem anderen". The -n ending is because of weak declension.
A litteral translation would be "A method which helps the one a lot could cause the other problems".
The sentence means the following: "A method, which for some might be very useful, can cause problems for others."
You might notice that my English rendering does not fully conform to the German structure of the sentence (I used the plural "some" and "others" instead of the singular dem einen, dem anderen in the German one), but I think that it's important to first get a clear idea of what this sentence is supposed to mean.
Then, the grammatical structure:
Eine Methode: subject of the main clause
die: relative pronoun, introducing the relative clause
dem einen: indirect object
hilft: verb of the relative clause
könnte... machen: verbs of the main clause
dem anderen: indirect object
Probleme: direct object
So to address your second question: dem anderen and Probleme do not belong together, but have two separate functions in this sentence.
Finally, the use of der eine, der andere. You can translate them like I did with "some... others", or "one person... another person", depending on the context. Bottom line is, that they convey the sense of something being experienced in two different ways for two different groups of people.