It depends what you mean by "real position". Also, just to clarify something that should be gotten out of the way, the Earth rotates, obviously, and the night sky appears to rotate around the Earth a complete 360 degrees in a 24 hours. That's why the geocentric model lasted as long as it did. That's what it looks like, and that's what everyone believed prior to Copernicus, but that's not really relevant to your question. I mention it, because what is relevant is that the stars are so far away that they appear fixed. They rotate together, they don't move past each other so the stars operate as a fixed background against which the sun, moon and planets move. So, when we talk about "movement" in the sky or position, we're talking about against the fixed stars in the background, not the rotation of the Earth.
After the fixed stars, the Sun is the simplest object in the sky, it moves a little bit against the background every day and it returns to the same place every year, the Sun's position against the fixed background stars was known long before Kepler, so Kepler always knew the position or direction of the Sun, even at night because the Sun held it's position against the background stars, moving only a little bit each day. He didn't know the distance to the sun (more on that later), but he knew the position.
Kepler also knew that Mars' orbit around the sun was 687 days. How did he know that? Well (these words aren't my own, but it's discussed here)
It's a simple matter to measure that the synodic period of Mars is
about 780 days. This is the time between successive oppositions of
Mars, meaning that Mars is due South at midnight. Given the
heliocentric model, it is easy to see, as shown in the Wikipedia
article, that 1/Synodic Period = 1/Earth's orbital period - 1/Mars
orbital period. So, once the heliocentric model was understood, it all
becomes easy.
Kepler was a brilliant Mathematician. Brahe wasn't so much. Now, I'm not saying Brahe was dumb, cause that's not accurate either, but he wasn't skilled in math the way Kepler was. Brahe was very patient and dedicated and he made the most accurate observations to date, some 10 times more accurate than anyone before him. He had the best equipment for making accurate observations in history, so to a person like Kepler, Brahe's notes were pure gold, containing decades of great accuracy. There was even a rumor that Kepler killed Brahe to get access to his observatory and his work, but most people think that's just a rumor, that it didn't actually happen, but there was enough uncertainty that Brahe's body was exhumed and tested for poison. (none was found). But I digress.
A 3rd bit of information is that by using parallax and the maximum angle that Mars varies in the sky, you can get a rough estimate of the distance to the planets relative to each other. Copernicus did that so Kepler didn't have to. A bit more on that here. and here.
So Kepler had a lot of information at his fingertips when he got access to Brahe's notes. He knew that Mars was about 1.5 times as far from the Sun as the Earth (from Copernicus) and he knew that Mars orbit was 687 days (not difficult given the heliocentric model), which means, every year and 322 days, Mars is in the same spot relative to the Sun, but the Earth has moved. - So you have 2 still objects and one moving object that's some "43 days" earlier in it's orbit each time Mars is in the same place and by taking that measurement every 687 days, you can learn a lot about the relative position of Mars, Earth and the Sun. And that's what Kepler did.
His two major breakthroughs (in my opinion) were observing that Mars wasn't on the same plane as the Earth (He did that observing Copernicus' observations, not Brahe's - I read that, I can't find the notation right now). And his other breakthrough was to figure out that the Sun wasn't at the center of the Earth's orbit. He did that by measuring the angle between the Earth and Sun and Earth and Mars every 687 days. More on that here.
His measurements telling him that the sun wasn't at the center of the Earth's orbit led him to his ellipse model. After that it was all clarification and more detailed measurement that led him to his 3 laws, but I think, recognizing that the Sun wasn't at the center of the Earth's orbit was his big "aha" moment that and his discovery of Mars being on a different orbital plane. Kepler's measurement was quite accurate. Mars' inclination to Earth is 1.87 degrees. Kepler had it measured at 1 degree, 50 minutes, or 1.83 degrees.