Let roses be R and carnations be C
"in a ratio of 2 to 7" means that the ratio of R to C is 2 to 7, meaning you'll have to cross multiply to translate it algebraically

since C = 343 we plug 343 in
:

ergo, she needs 98 roses
to make sure of the answer:
"ratio of 2 to 7" is technically a fraction =>

and since the ratio of the roses to the carnations is the same as
we plug the values R = 98 and C=343:

check with calculator too, hope i helped <33