There are two schools of thought: One is to attempt to maintain a waterproof 'seal' by ensuring all grout is treated with a waterproofing agent (but that agent is likely to break down and need to be reapplied after 5 years). The other is to assume that any waterproofing will eventually fail, and that one should try to channel any moisture back into the tub.
In either case, the base of the tub can be grouted as shown in you picture, but the grout won't stick to the fiberglass and when you step in and and seal it provides will be broken. Thus if you want a true seal you should use a flexible silicone caulking.
However, moisture can be absorbed by unsealed grout and into the cement backer board, and when you take a hot shower, the temperature differential can cause condensate to form on the back of your tiles. The lip in your picture is called a "weep hole" and is intended to allow that condensate to flow out from behind the tiles and thus is not intended to be covered with caulking or mortar.
The effectiveness of weep hole is contested because if your tiles aren't troweled vertically, the condensate won't be able to flow down to it. Moreover, your specific setup is questionable as you likely are better off having small weep holes every 12-18 inches than just 2 large ones on either side of the tub.
Thus, my suggestion would be:
Carefully clean out loose grout using a grout saw (try not to scratch the tub).
If you are sure that your tile was installed using vertical
troweling, then re-grout the tub everywhere but where your weep holes
are (and possible leave an extra spot in the center of the wall),
then seal all grout with a grout sealer.
If you aren't sure you have vertical troweling, then don't bother
rerouting the base of your wall, but re-seal the grout in the rest of
your wall with a grout sealer, then use a silicone caulk around the
entire base of your shower. Remove and replace this caulking about
once a year.
See this answer for more detail about tile tub interfaces: https://diy.stackexchange.com/a/67538/18575