A length can be converted to a number by prefixing it with \number. This gives its value in terms of the sp unit which is 1/65536 of a pt. However multiplying out two such things could easily exceed the TeX bound on integers which is 2^31. There is no concept of area in TeX and no \areaexpr provided by e-TeX either.
Note also, that although you may input lengths to TeX in various units pt, cm, in, etc..., there is no conversion back, and \the\<dimen> prints a value in pt unit (I just realized that LaTeX seemingly has NO command for the user to display the value of a length register defined by \newlength and set by \setlength; one only has at one's disposal the primitives \the and \number from TeX).
As xintexpr does exact algebraic computations with arbitrarily big numbers, and also knows to extract square roots with (by default) 16 digits of precision, you can use it (in combination with \dimexpr) for your problems.
\documentclass{article}
\usepackage{xintexpr}
\newlength{\lenA}
\newlength{\lenB}
\newlength{\lenC}
\newlength{\lenD}
\xintNewExpr{\Harmonic}[2]{round(2/(1/#1+1/#2))} % I added a 2 here
\newcommand{\HarmonicLen}[2]{\dimexpr\Harmonic {\number#1}{\number#2}sp\relax}
\xintNewExpr{\Pythagore}[2]{round(sqrt(#1^2+#2^2))}
\newcommand{\PythagoreLen}[2]{\dimexpr\Pythagore {\number#1}{\number#2}sp\relax}
% 1sp = 1/65536 pt.
% 1pt = 1/72.27 in.
% 1in = 2.54cm
% 1 sp^2 = 1/65536*1/65536 * 1/72.27 * 1/72.27 * 2.54 * 2.54 cm^2
%
\edef\ConvFactor {\xinttheexpr 1/65536*1/65536 * 1/72.27 * 1/72.27 * 2.54 *
2.54\relax }
\newcommand{\RectArea}[2]{%
\xintRound{4}{\xintPrd{{\number#1}{\number#2}{\ConvFactor}}}}
\begin{document}
\setlength{\lenA}{10pt}
\setlength{\lenB}{10pt}
\setlength{\lenC}{\HarmonicLen{\lenA}{\lenB}}
\setlength{\lenD}{\PythagoreLen{\lenA}{\lenB}}
\the\lenA,\the\lenB$\to$\the\lenC,\the\lenD (or directly: \the\HarmonicLen{\lenA}{\lenB},
\the\PythagoreLen{\lenA}{\lenB})
\setlength{\lenA}{1cm}
\setlength{\lenB}{1cm}
\setlength{\lenC}{\HarmonicLen{\lenA}{\lenB}}
\setlength{\lenD}{\PythagoreLen{\lenA}{\lenB}}
\the\lenA,\the\lenB$\to$\the\lenC,\the\lenD
% (or directly: \the\HarmonicLen{\lenA}{\lenB},
% \the\PythagoreLen{\lenA}{\lenB})
\setlength{\lenA}{1cm}
\setlength{\lenB}{2cm}
\setlength{\lenC}{\HarmonicLen{\lenA}{\lenB}}
\setlength{\lenD}{\PythagoreLen{\lenA}{\lenB}}
\the\lenA,\the\lenB$\to$\the\lenC,\the\lenD
% (or directly:
% \the\HarmonicLen{\lenA}{\lenB},
% \the\PythagoreLen{\lenA}{\lenB})
\setlength{\lenA}{1in}
\setlength{\lenB}{2in}
\setlength{\lenC}{\HarmonicLen{\lenA}{\lenB}}
\setlength{\lenD}{\PythagoreLen{\lenA}{\lenB}}
\the\lenA,\the\lenB$\to$\the\lenC,\the\lenD
% (or directly: \the\HarmonicLen{\lenA}{\lenB},
% \the\PythagoreLen{\lenA}{\lenB})
\setlength{\lenA}{5cm}
\setlength{\lenB}{7cm}
The rectangle with sides of lengths 5cm (\the\lenA) and 7cm (\the\lenB) has an
area equal to \RectArea{\lenA}{\lenB} cm${}^2$.
\setlength{\lenC}{5in}
\setlength{\lenD}{7in}
The rectangle with sides of lengths 5in (\the\lenC) and 7in (\the\lenD) has an
area equal to \RectArea{\lenC}{\lenD} cm${}^2$.
The ratio of these two areas is \xinttheexpr
round(\RectArea{\lenC}{\lenD}/\RectArea{\lenA}{\lenB},4)\relax{}
and the square or
2.54 is \xinttheexpr round(sqr(2.54),4)\relax.
\end{document}

fpandpgfmathpackages with plain or ConTeXt, for example. Secondly, there is a 'LaTeX assumption' on the site as it's realistic: notice that most questions are about LaTeX but we don't have a [tag:latex] tag. The [tag:latex-project] tag is really aimed at things that are very 'focussed', for example LaTeX kernel mechanisms such as float handling. Notice that there are tags for the other formats, e.g. [tag:plain-tex]. – Joseph Wright Sep 05 '13 at 14:19