there is no way to make this work... you can't have duplicate extensions, and having overlap at the start of your extensions counts as a duplicate.
The most elegant way out of this is to do this:
Assuming you have 1xxx, 2xxx and 3xxx as your 4 digit sites,
make all the 3 digit sites 1xx, 2xx, 3xx etc to become 41xx, 42xx, 43xx etc.
That way everything is 4 digits, nothing conflicts and everyone only needs to remember that if it was a 3 digit site, you now add a 4 in front.
Or you deal with the three digit extensions that overlap the portions of 4 digit extensions and make them something else. The aesthetics of mixing 3 and 4 digit extensions horrifies me, though.

You can do it (have 3 and 4 digit extensions at the same time), you just need to deal with the overlap now, and the fact that somewhere down the road someone is SURE to add another extension that will create another overlap issue. It just screams WRONG.
If you lived in Japan, whoever told you this would work would be made to stand out in the street and publically castigate themselves. The shame would be so terrible they would never tell anyone that again.
GB