As I understand, in comparative form of Adjectives, elder is used of persons, and older is used of both persons or things. One other feature of elder is that it is not used with than. However, it is not clear to me whether it can be used with to. For example, while the following are most likely correct
X is my elder brother
X is older than me
is it okay to use elder to in the following way
X is elder to me
While we are on the topic, I would also like to get some advice on how to use them when specifying the age. Like, what is the proper way to write the following sentences
When using elder
X is elder to me by 2 years/X is 2 years my elder
When using older
X is 2 years older than me/X is older than me by 2 years
Sorry if this comes across as too confusing. I tried my best to make it as clear as possible.
Thanks