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.
Cheers,
Denis.