Hi Richard
You could achieve this using the starts-with() function. The following example returns a number if veg_field starts with 'A' or 'B'; else it leaves the field blank:
if(starts-with(${veg_field},'A'),25,if(starts-with(${veg_field},'B'),10,''))
For more on XLSForm functions and operators, please see: Formulas—Survey123 for ArcGIS | Documentation
Best,
Jim