Mit der Antwort aus [TikZ: Quadrat über einer Linie][1] wäre dann eine Möglichkeit
    \documentclass{article}
    \usepackage{tikz}
    \usetikzlibrary{through}
    \usetikzlibrary{calc}
    \begin{document}
    \begin{tikzpicture}[
      scale=.1,
      dot/.style = {
        draw,fill,inner sep=1pt,
        label={#1}
      }]
      \path% mehrmals genutzte Punkte als coordinate speichern
        (29,29) coordinate (M)
        (9,8) coordinate (P)
        (P-|M) coordinate (H)% Schnittpunkt Horizontale durch P und Vertikale durch M
      ;
      \node[dot={below:$(5|5)$}] at (5,5) {};
      \node[dot={{[label distance=7pt]above:$(9|8)$}}] at (P) {};
      \node[dot={above right:$(29|29)$}] at (M) {};
      \node[draw,circle through={(P)}] (c) at (M) {};
      \draw[help lines] (c.west |- c.north) rectangle (c.east |- c.south);
      \draw (c.west |- P) -- (P) -- (c.south -| P);
      \draw (H)--(P)--(M)--(c.south);
      \draw [dashed]% Quadrate über Linien
        (P)--($(P)!1!90:(M)$)--($(M)!1!-90:(P)$)coordinate(hpm)--(M)
        (M)--($(M)!1!90:(H)$)--($(H)!1!-90:(M)$)coordinate(hmh)--(H)
        (c.south)--($(H)!1!90:(P)$)--($(P)!1!-90:(H)$)coordinate(hhp)--(P|-c.south)
      ;
      \path% Beschriftung der Quadrate
        (P) -- node {$r^2$}(hpm)
        (M) -- node {$(r-9)^2$}(hmh)
{$(r-8)^2$}(hmh)
        (H) -- node [below] {$(r-8)^2$}(hhp)
{$(r-9)^2$}(hhp)
      ;
    \end{tikzpicture}
    \end{document}
![alt text][2]
  [1]: http://texwelt.de/wissen/fragen/11914/tikz-quadrat-uber-einer-linie/11915
  [2]: http://texwelt.de/wissen/upfiles/tw_quadrateueberlinien.pnghttp://texwelt.de/wissen/upfiles/tw_quadrateueberlinien_1.png