を得るため

in order to obtain

→ を
phrase Rare #34,463
in order to obtain The particle を marks what is being obtained; ため expresses purpose.
JA: 必要な情報を得るために、彼女は本を読んだ。
EN: She read a book in order to obtain the information she needed.

彼は彼女の好意を得るため出来るだけの事をした。

He did everything he could to win her favor.