The Star Trek: Deep Space Nine Technical Manuel, published on 1 October 1998 ([1https://memory-alpha.fandom.com/wiki/Star_Trek:_Deep_Space_Nine_Technical_Manual
states that Bajor is 52 light years from Earth.
The star Regulus is about 79.3 plus or minus 0.7 light years from Earth. That makes it about 78.6 to 80.0 light years from Earth. That is according to the most accurate measurements of stellar distance so far, from the Hipparcos satellite.
1https://en.wikipedia.org/wiki/Regulus
Considering the relatively short distance and relative ease of measurment, it seems very likely that the less accurate older distances which the creators of DS9 may have read in older reference books could hardly have listed Regulus as being closer than 65 light years from Earth or farther than 100 light years.
According to the Deep Space Nine episode "Fascination" first aired on 28 November, 1994, Bajor was three hundred light years from Regulus:
SISKO: All right, tell me about it.
JAKE: Mardah's gone, Dad. She got accepted to the Science Academy on Regulus Three.
SISKO: That's a good school.
JAKE: It's three hundred light years away.
1http://www.chakoteya.net/DS9/456.htm
It seems obvious that the loosest "three hundred light years" can be interpreted is as being between two hundred and four hundred light years. Thus according to the less accurate distances to Regulus that the writers and creators of DS0 might have remembered, Bajor could have been between one hundred and five hundred light years from Earth. According to the best distances to Regulus available today Bajor should be between 120 and 480 light years from Earth depending on the angle between Earth, Regulus, and Bajor.
If the creators and technical staff of DS9 already wanted to make Bajor relatively close to Earth by the time "Fascination" was written in 1994, they should have changed the distances from Bajor to Regulus III to be about 100 light years, so that Bajor could be about 20 to 180 light years from Earth depending on the angle between Earth, Regulus, and Bajor. Or they could have changed the star named from Regulus to be one that was about 300 light years from Earth, so that Bajor could be between 0 and 700 light years from Earth.
And in 1998 Rick Sternbach, Harold Zimmerman, and Doug Dexler, the members of the Star Trek: Deep Space Nine technical staff who wrote the Star Trek: Deep Space Nine Technical Manuel, should have known better than to write that Bajor was 52 light years from Earth. They should have had a computer file with every real and imaginary planet and star ever mentioned in Star trek with notes about how far the real stars were from Earth, and for each time that a solar system was mentioned as being a distance from another one, or when the travel time was mentioned, they should have listed the the distance or travel time under both stars.
Then they could have looked at the file on Bajor and seen that it was 300 light years from Regulus, and then looked at the file on Regulus to see that it was 300 light years from Bajor and about 65 to 100 light years from Earth, and thus Bajor could not possibly be only 52 light years from Earth.
The DS9 episode "The Search, Part I" had Jake and Sisko return home to DS9 and ask themselves when it started to feel like home to them.
SISKO: Phew. I wonder when that happened?
JAKE: What?
SISKO: When did I start thinking of this Cardassian monstrosity as home?
JAKE: I think it happened last Thursday, around seventeen hundred hours. When you took all this stuff out of storage back on Earth.
SISKO: Careful. That's a two thousand year old Yoruba mask and that stuff is one of the finest collections of ancient—
BOTH: African art you'll ever see.
It is normal to interpret "last Thursday" as being less than a week earlier because Thursday of this week as not yet come. I think that it might be possible to interpret "last Thursday" as the Thursday in last week before this week's Thursday and thus make it less than two weeks earlier. Thus "last Thursday" might be two to seven days or possibly two to fourteen days earlier.
So the Defiant traveled one hundred to five hundred light years in two to seven days, or less plausibly in two to fourteen days.
That give it a speed of about 14.2857 to 250 light years per day, or 5,217.857 to 91,312.5 light years per year. If the less plausible up to 14 days interpretation is used, the speed of the Defiant could be as low as 7.1428 light years per day, or 2,608.9285 light years per year.
That is considerably faster than the TOS warp formula or the TNG warp formula - possibly up to about 50 times the TNG warp formula.
So even if the technical staff of DS9 never noticed similar problems dating back to TOS, that alone should have led them to think of some explanation for this seeming contradiction.
Here are some possible solutions:
One:
In the era of DS9 a week was used which used the name of at least one of our weekdays, but had more days in it than our week. Thus one or two weeks to get to DS9 might have been more than seven to fourteen days.
"Where No One Has Gone Before":
PICARD: That's not possible. Data, what distance have we travelled?
DATA: Two million seven hundred thousand light years.
and:
LAFORGE: Message on this has been transmitted to Starfleet, sir.
DATA: Which, traveling subspace, they should receive in fifty-one years, ten months nine weeks, sixteen days
Two:
Starships often reach their destinations in less time that it takes to travel the distance between departure point and destination, by entering space warps which instantly transport them to distant stars and following a path from space warp to space warp until they reach their target star. And somehow nobody has ever mentioned it in any episode or movie.
This theory has the advantage of having been around for decades so some Star Trek fans might have heard of it already.
Three:
There are a number of different planet Earths existing in different far-flung regions of space, each at least a billion light years apart, each with its near duplicate solar system and galaxy and nearby neighboring galaxies, each of which has been rearranged to match the original Earth, solar system, and galaxy as closely as possible. Perhaps this is done to hide the real Earth, to protect it with duplicates so that if someone goes looking for Earth in order to destroy it they will find one of he duplicate Earths instead and destroy it thinking that they have destroyed the real one.
And perhaps the duplication of the stellar positions in the various duplicate Milky Way galaxies is not perfect, so that stars like Vega, Rigel, Deneb, Canopus, Capella, Pollux, Regulus, etc. may be much closer to or farther from the duplicate Earths in those various duplicate galaxies.
And so the duplicate Regulus may be farther from the Duplicate Earth in the Star Trek fake Milky Way Galaxy than the Duplicate Regulus is from the Duplicate Earth in our fake Milky Way Galaxy. If the Duplicate Regulus in the duplicate Star Trek galaxy is about 300 light years from Duplicate Earth, and if the direction from Regulus to Bajor is almost exactly the same as the direction from Regulus back to Earth, Bajor could be only 52 light years from Earth in that Duplicate Milky Way Galaxy in Star Trek.
And if any of the creators of any Star Trek movies or TV shows think that the above three theories are too bizarre, well maybe they should have paid more attention to making distances and travel times more consistent when they had a chance so there wouldn't be any need for such theories!