in theory, public sector (if we're talking local authority) jobs are supposed to be evaluated against a single pay grade structure, so that the skills and knowledge required to be at a particular level (say) as a social worker will be on a similar sort of pay level to (say) a highways engineer with similar level of skills, qualifications and knowledge, and to include 'manual' and 'non manual' workers in the same pay structure. and also to try and eradicate the historical grading of roles traditionally seen as 'womens work' lower than roles traditionally seen as 'mens work'. there is usually a process to request a job re-evaluation if a job role has changed over time.
in practice, there tends to be a bit of flexibility - london authorities always tended to put jobs a grade or two higher then they would be elsewhere as a recognition that getting / keeping staff was harder (even with the london weighting in the national agreement.)
and i have seen a job somewhere fairly close to home that's been advertised three times at a slightly higher grade for more or less the same thing - it's a bit of a niche and from what i gather they still haven't managed to get anyone. mildly annoying in that it's my sort of thing, but they only had funding for a 2 year contract and i didn't want to give up a job that's (on paper at least) permanent for it...
to go back to the specifics -
were these roles (first time round) advertised as 2 separate jobs, and if so did you apply for both, or just one? or was it that they advertised as two vacancies for one role? (as in there are multiple posts at the same grade / job description)
sometimes where there's 2 similar but different jobs being advertised, you can apply for both in one application, sometimes they insist you put two separate applications in, sometimes they say you can only apply for one or the other.
is the 'new' job being advertised exactly the same (as in the job description / person specification) as last time round, or have they sneaked in a higher level of technical or management responsibility to justify the higher grade? if they have, would you meet these requirements? in which case can you either apply for it, or ask if your existing application can be considered for it?
or if the new job is identical to what you've been offered, are they going to adjust the pay range so that you'll be starting at the bottom of pay grade Y rather than at the top of pay grade X? (in which case you'd be on a par with new person as and when they arrive.) have they said they are offering you this much pay at pay grade X or have they just said they are offering you this much pay?
you can have 'career graded' roles where a job crosses two or three pay grades, sometimes with a particular thing, either qualification, skills or duties, triggering a move from grade X to grade Y - and some managers can abuse this for favouritism / discrimination to let one person cross that bar and another person not, and it can be hard to prove.)
having two people doing the same job but on different pay grades (rather than being at two different points in the same pay grade/s for the job) sounds dubious...
(all of the above subject to the usual disclaimers - i'm not a lawyer or HR professional, and it's been a while since i was a union rep)