There's many ways to do it, but the way that answers your question with the least damage to your sample code would be to leave it to the Antenna House formatter to add the lengths:
<!-- Untested. -->
<xsl:attribute-set name="head5">
<xsl:attribute
name="distance">2cm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="head6">
<xsl:attribute name="distance">
<xsl:variable name="dummy" as="element()">
<dummy xsl:use-attribute-sets="head5" />
</xsl:variable>
<xsl:value-of select="$dummy/@distance"/> + 2mm</xsl:attribute>
</xsl:attribute-set>
However, this is inefficient, since the formatter would have to evaluate the expression every time that it encounters the 'distance' attribute (which isn't defined in XSL 1.1, BTW) in the FO document.
You could instead do the calculation in your XSLT beforehand, e.g.:
<xsl:variable name="distances"
select="'2cm', '22mm'"
as="xs:string+" />
<xsl:attribute-set name="head5">
<xsl:attribute name="distance" select="$distances[1]" />
</xsl:attribute-set>
<xsl:attribute-set name="head6">
<xsl:attribute name="distance" select="$distances[2]" />
</xsl:attribute-set>
Alternatively, it's not hard to write an XSLT function that sums lengths so you can put a calculated value in the FO document.