I would give an hour each way, then about 90 minutes for dinner at Boma.
You would have to be back at Studios at 6:45pm at the latest to get seating for Fantasmic.
The earliest dinner seating at Boma is at 5pm. If you got the first dinner time, then finished dinner by 5:30 - 5:45 pm, then you "might" make it back. When are you going?? Is Fantasmic showing every night, or is it on it's reduced schedule of a couple nights a week? If it is on reduced schedule, then the lines for Fantasmic show up EARLY and are LARGE.
Quite honestly, if you do want to have dinner away from the park and return for Fantasmic, I would go with a late lunch at the Boardwalk or Yacht or Beach club. Just a short walk away from the Studios.