It is possible to combine them but it requires a lot of work
It is usually possible to combine two campaigns that take place in the same area, provided that they either take place roughly around the same time OR do not depend on the world's timeline and can be shifted forwards or backwards in time. You can either run it as two separate, equally important storylines in parallel, possibly with a shared ending, shrink the one you find less important/interesting to a series of side quests, or fully integrate them into a single coherent story. The last option is the most difficult out of the three and requires a lot of thinking and coming up with ideas that would works as the "glue" to tie them together.
You need a good understanding of both campaigns you want to connect, need to know the main storylines and any side stories you want to keep inside out, think about the places where they overlap, either how to make the overlap make sense, or if you can't, how to separate them, and where they run parallel, how to connect them in a way that makes sense. Expect to have to do a fair share of homebrewing and thinking for that.
Talking specifically about The Dragon of Icespire Peak and Lost Mines of Phandelver, I have done a similar thing to what you are wanting to do. Since Dragon of Icespire Peak doesn't have much in terms of storyline apart from just, well, the dragon, and is just a series of separate quests, I kept the storyline of Phandelver pretty much intact and just added the Dragon as a prolonged side quest loosely tied to the events in Phandelver (I used the presence of the dragon as the motivation for all the criminal activity going on since it made it difficult to do much of everything else).
Since both campaigns have lots of side quests that work pretty much independently, I also thought of ways to tie some of them into each other (e.g. the banshee from Phandelver into the orcs from The Dragon) to make it seem more like it's one joint campaign rather than 2 separate ones running in parallel.
Once you've got the story down, you will need to do some balancing, especially on the later parts of both campaigns since your PCs will be much higher level once they reach them than they would be if playing them separately. Think about the flow you want for your story, figure out the milestones where your PCs will earn levels and rebalance the parts where they will be significantly more powerful than intended.