It is hard to answer your question based on the details you provide. My first question is whether your position is covered by a collective bargaining agreement? In other words, do you work in a union shop. I suspect the answer is no, otherwise there would be a clearly defined pay scale for your position and hiring a new employee at a higher salary than you would violate seniority provisions and other aspects of the union contract. However, if you are a member of a union, the first step would be to raise this issue with your union representative or shop steward and possibly filing a grievance.
Similarly, if you are a government employee, there would also likely be a well-defined pay scale for your position that would take seniority into account.
However, if you are a non-union, private sector employee, in most circumstances your employer can pay different employees performing the exact same job different salaries regardless of seniority. In most circumstances, the only restriction on an employer would be that the salary cannot be determined based on criteria that discriminates against a protected class, i.e., basing compensation decisions on race, religion or gender. Of course, even if compensation decisions were being made in a discriminatory manner, it would be very hard to prove for a variety of reasons. Among others, an employer may be able to show that different salaries are based on differences in job performance, differences in experience, or differences in the overall labor market at the time of hire (e.g., if computer programmers are presently in short supply, it may cost an employer more to hire one than at a time when many programmers are looking for work). Also, employers generally keep salary information confidential, so it would be very difficult to determine who is being paid what in the workplace, let alone whether those compensation rates were decided in a discriminatory manner.
Legal Information is Not Legal Advice
My answer provides information about the law based on the limited information provided in the questions asked and is not intended to provide legal advice or opinions, and does not constitute an attorney-client relationship. The answer to the question is for educational and informational purposes only. The law differs in each jurisdiction and may be interpreted or applied differently depending on the jurisdiction or situation. Accordingly, I highly recommend that you consult with an attorney to discuss the details of your problem so you can get legal advice tailored to your particular circumstances.