For example: I want to know the distance between Alpha Orionis (Betelgeuse) and Beta Orionis (Rigel). Is this possible? You only know the distance from Earth. May be this is a math problem and not an Astronomy question.
If you know the distance of each star from earth, and the angle between the stars, then you can us the cosine rule to find their distance from each other. See this for detail https://en.wikipedia.org/wiki/Law_of_cosines