How did Kepler "guess" his third law from data?
Kepler's account of how the third law came to be is as follows (Caspar p.286; emphasis mine):


  On the 8th of March of this year 1618, if exact information about the time is desired, it appeared in my head. But I was unlucky when I inserted it into the calculation, and rejected it as false. Finally, on May 15, it came again and with a new onset conquered the darkness of my mind, whereat there followed such an excellent agreement between my seventeen years of work at the Tychonic observations and my present deliberation that I at first believed that I had dreamed and assume the sought for in the supporting proofs. But it is entirely certain and exact that the proportion between the periodic times of any two planets is precisely one and a half times the proportion of the mean distances.


Although Kepler does not actually describe inspiration that led him to believe this, the curious phrasing provides a very strong clue when combined with some background biographical information:


John Napier published Mirifici Logarithmorum Canonis Descripto in 1614, which contained the then-new invention of logarithms. Kepler was aware of Napier's work by 1617 (Caspar p. 308), perhaps earlier.
Joost Bürgi published work on logarithms almost at the same time as Napier, and Kepler was similarly aware of Bürgi, even praising his mathematical abilities as surpassing most professors of mathematics.


Thus, Kepler's statement is is equivalent to saying that the data makes a slope of 1.5 on a log-log graph, a which is a very simple linear relationship on this scale.



References:


Caspar, Max, Kepler, (Dover, New York, 1993).