If the other person has not got the registration for the brand name, then you may apply for the registration of the trademark and claim your ownership over the brand name only in case you are the first user of the brand name for commercial purposes.
Even in the case where the other person has applied for the trademark, you also may still apply for the same as the first user will have a preference of getting the trademark on his name.
You should file opposition if he has filed a trademark application for your brand.
The only condition for this is that you will have to be able to establish the fact that you were the first user of the brand name and not the other person so you need to collect the proof of the usage to help you in future.