You need to amend your data step so variable bmi_group gets populated.
data homework_2;
set homework_1;
bmi_group=put(bmi,bmi_group.);
run;
For just using a formatted value in a where clause you could also directly write code like:
proc print data=homework_1;
where put(bmi,BMI_group.)='overweight';
run;
And if you then want to print the bmi values with a format applied you could code like:
proc print data=homework_1;
where put(bmi,BMI_group.)='overweight';
format bmi bmi_group.;
run;