How was Cassini able to measure and use the Earth-Mars distance to get the Earth-Sun distance? How was Cassini able to measure and use he distance between Earth and Mars to get the Earth-Sun distance? How were the ratios of Earth-Mars and Earth-Sun calculated then? Given Kepler's laws all we need to now find is orbital period? How did they manage to do this without distance?
Giovanni Cassini used parallax with a friend, from two different sides of the Earth. 

It was generally accepted that the stars didn't move relative to each other or relative to the motion of the Earth.   The planets moved, the stars didn't.

Cassini was before Newton but after Kepler, so he had access to Kepler's 3rd law which is the law of periods, which tells you the ratio of Mars' distance to the Sun and Earth's distance to the Sun.     (Estimates like that could also be done with angles before Kepler), But, if Cassini could measure a single distance, for example, Earth to Mars when Mars passes at it's closest point, then the other distances can easily be worked out.

Cassini sent a friend and fellow astronomer, Jean Richer, to French Guiana and they both took the position of Mars at the same time from different sides of the world, nearly 12,000 km distance.

Mars' distance at closest pass is about 54 million km in distance, so the variation in angle from one side of the Earth to the other is a ratio of 1 to about 4,500, which is a bit under 1 minute in angular variation.

I don't know how Cassini and Jean Richter were able to measure to such a high degree of accuracy, and whether there was some lucky guessing in there, or if they had equipment that good (if anyone knows, please feel free to make a more detailed answer).  But that's the gist of it.   Mars is in a different place relative to the background stars when viewed from different sides of the Earth and by measuring how much Mars moves from those two points on Earth, an estimate of distance can be made.

Cassini's estimate was, it turns out, surprisingly accurate, within about 7% of the actual distance.  His astronomical unit was 140 million km or 87 million miles.   His method works, though the elliptical orbit of Mars makes it a bit harder.   The real problem, as was often the case in early astronomy, was how accurate the measurement was.

Short article here

Longer article here

Also discussed here, under 1671-1673

The 2nd article says the angle is 20 arc seconds.   When I do the math, I get slightly about 46 arc seconds.   So, I invite correction if I made a math error.     20 arc seconds is even harder to measure, so any details on Cassini's margin of error would be welcome too.     I suspect there was concern that his method lacked accuracy because the Venus transit 100 years late seems to get a lot more attention as the first accurate measurement of the orbital distance of the planets.