Take a look at the sentence again:
Solita has packed an orange soda not only
for herself but
also Josh.
When you use not only ... but also, you must have two equal grammatical items. After not only, notice that you have a prepositional phrase, for herself. But after but also, you have a noun, Josh. The structure is not parallel.
To fix the sentence, you can write not only for herself but also for Josh, or you could say for not only herself but also Josh.