This can be done using a few assertion to calculate the 2 numbers and then compare if the result is less than another number. Below you will find a policy fragment on how to do this.
<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<wsp:All wsp:Usage="Required">
<L7p:SetVariable>
<L7p:Base64Expression stringValue="PGEvPg=="/>
<L7p:ContentType stringValue="text/xml; charset=utf-8"/>
<L7p:DataType variableDataType="message"/>
<L7p:VariableToSet stringValue="math"/>
</L7p:SetVariable>
<L7p:SetVariable>
<L7p:Base64Expression stringValue="MTU="/>
<L7p:VariableToSet stringValue="a"/>
</L7p:SetVariable>
<L7p:SetVariable>
<L7p:Base64Expression stringValue="MTI="/>
<L7p:VariableToSet stringValue="b"/>
</L7p:SetVariable>
<L7p:SetVariable>
<L7p:Base64Expression stringValue="MzA="/>
<L7p:VariableToSet stringValue="result"/>
</L7p:SetVariable>
<L7p:ResponseXpathAssertion>
<L7p:VariablePrefix stringValue="simpleMath"/>
<L7p:XmlMsgSrc stringValue="math"/>
<L7p:XpathExpression xpathExpressionValue="included">
<L7p:Expression stringValue="$a + $b"/>
<L7p:Namespaces mapValue="included">
<L7p:entry>
<L7p:key stringValue="s"/>
<L7p:value stringValue="http://schemas.xmlsoap.org/soap/envelope/"/>
</L7p:entry>
</L7p:Namespaces>
<L7p:XpathVersion xpathVersion="XPATH_1_0"/>
</L7p:XpathExpression>
</L7p:ResponseXpathAssertion>
<L7p:ComparisonAssertion>
<L7p:Expression1 stringValue="${simpleMath.results}"/>
<L7p:Expression2 stringValue="${result}"/>
<L7p:FailIfVariableNotFound booleanValue="false"/>
<L7p:Operator operator="LE"/>
<L7p:Predicates predicates="included">
<L7p:item binary="included">
<L7p:Operator operator="LE"/>
<L7p:RightValue stringValue="${result}"/>
</L7p:item>
</L7p:Predicates>
</L7p:ComparisonAssertion>
</wsp:All>
</wsp:Policy>