I made a generalization of the following problem (it's a problem from the IMO shortlist in some year) :
Let $a,b$ be fixed positive integers . If : $$a^n+n \mid b^n+n$$ for every positive integer $n$ then prove that $a=b$ .
This is the generalization :
Let $a,b,c,d$ be fixed positive integers . If : $$a^n+n^b \mid c^n+n^d$$ for every $n$ then prove that $c=a^k$ and $d=kb$ for some positive integer $k$ odd .
I haven't managed to solve it so this is why I'm looking here for help .Thank you all .
EDIT: I originally asked to prove that only when $a=c$ and $b=d$ it is possible but thanks to the comments below there are other cases when the divisibility holds .
The problem is now to show that these are the only cases that work .