It's not uncommon for friends who work in the same company to apply for the same job. After all, you're both likely interested in the same field and have similar skills and experience. However, it can be a bit awkward when you find out that you're competing against your friend for the same position.
Here are a few ideas on how you could handle this situation:
1. Talk to your friend
The first thing you should do is talk to your friend about the situation. Be honest about your own feelings and concerns and ask them how they're feeling about it. It's important to communicate openly and honestly with each other so that you can both manage your expectations and avoid any misunderstandings. Maybe invite your friend for a coffee outside of the office building so you can speak freely. You may want to talk about how you will interact with each other during the interview process, as buddying up to prepare for your interview, or instead comparing yourself to your friend could make things difficult for your relationship.
2. Focus on your own performance
It's important to remember that the hiring manager will be making their decision based on your individual qualifications and performance. So, instead of worrying about what your friend is doing, focus on putting your best foot forward in the interview process. Be prepared to answer questions about your own skills and  experience, and demonstrate why you're interested in the job.
3. Don't let the competition affect your friendship
It's important to keep your friendship separate from your job search. Don't avoid your friend or talk about the job all the time. Instead, focus on enjoying your friendship and doing things together that are unrelated to work. It's easy to start comparing yourself to your friend, especially if they have more experience or qualifications than you. However, it's important to remember that everyone is different. Focus on your own strengths and what you have to offer.
This sort of situation is a great opportunity in learning how to navigate professional and personal lives. If this role is pretty close to your idea of a dream job, taking some time to weigh up what the role will and will not give you, as well as what your friend does and does not give you, may give you some structure and clarity. Ask yourself: If you got the job, but lost your friendship, would it be worth it? Also, if your friend got the job instead of you, would it affect your friendship? Also, if this isn’t your dream job, but a ‘nice-to-have’ for some further skills development, but your friend sees this as a perfect role, you may want to sit down and consider if you should proceed with applying for the role. It’s your choice after all, but remember your friendship is more important than any one job and it is likely your friendship will last many years more than this role you are applying for.
The Interview
If you’ve decided to apply and you are invited for an interview, try to avoid wherever possible badmouthing your friend (or any other candidates for that matter) to the hiring manager. If you go down this route, you will soon find out that the hiring manager is more likely to view you as a negative person than as a qualified candidate. At this stage, it would be good to know if your friend also has an interview (or not). Honesty and open communication are key here, and not rubbing their face in it too much if they haven’t secured an interview. Some of you may feel that you just don’t want to know if they have an interview, as that will add pressure or a sense of competition, but secrecy is never conducive to a strong and supportive friendship.
During the interview, focus on your own strengths and what you can bring to the role. You can only be in charge of your own actions and comparing yourself needlessly to others will only serve to lessen your confidence.
The Decision
When the interviews are over and the decision is made, be respectful of the outcome. If your friend gets the job, be happy for them and see if you can do something together to celebrate. If you get the job, be grateful for the opportunity and reflect on the good work that you have put into career and into the interview process. And if it is you that gets the job, calling your friend up the moment you find out to brag about it may not be the best option. Again, go somewhere quiet where you can both speak and listen to each other is best. And if neither of you get the job, support each other, share stories and have a good laugh about it, and move on.
Have you ever been in this situation before? If so, how did you deal with it?