The best way to approach this problem is by identifying primary pain points that users share and focus on those feature-wise, a common denominator of some sorts. These pain points need to be very high/strong though to be valuable for multiple target audiences.
If you're facing two target markets (you're a connecting middleman of some sorts) then you might consider building two separate entry points with two functionality sets. That is only justifiable when one target market offer cannot exist without the other.
In a typical situation you still want to identify the target users that contribute to the biggest market with largest growth potential and tailor your offering to those.
Once you identify the segment try to understand who early adaptors are and make your product for their biggest pain points first, then expand once you have traction.
As a conclusion I would suggest that sometimes you have to choose who you leave behind in your offering at least until you have traction and growth with your primary target audience.
Please feel free to reach out if you want more advice, as I deal with that on the daily basis with my current job.
This is a good problem to have. We're in the same position with our product Widgetic.
My advice would be to go through this article by Paul Graham:
I did a resume of what you need, here:
**Fire** - Focus on a deliberately narrow market (subsets of users). It's like keeping a fire contained at first to get it really hot before adding more logs.
**Consult** - pick a single user and act as if they were consultants building something just for that one user. The initial user serves as the form for your mold; keep tweaking till you fit their needs perfectly.
As you can see, this also seems the best approach - which not many products are lucky to have - to pick a specific target user group and focus on that initially, to get as much of that market first.