if(
prop("PERCENT") > 0,
subtract(
toNumber(prop("VALUE A")),
multiply(divide(prop("PERCENT"), 100), toNumber(prop("VALUE A")))
),
prop("VALUE B")
)
Converting to Notion notations:
if(prop("PERCENT") > 0,subtract(toNumber(prop("VALUE A")),multiply(divide(prop("PERCENT"), 100), toNumber(prop("VALUE A")))),prop("VALUE B"))