Not sure about easy, but for such simple arithmetic you could use the RESOLVE() function to take advantage of the power of the macro processing language.
data test;
gestational_age = "32+2 weeks" ;
expression=scan(gestational_age,1,' ');
age = input(resolve(cats('%sysevalf(',expression,')')),32.);
run;
proc print;
run;
gestational_
Obs age expression age
1 32+2 weeks 32+2 34