The observation point on Earth and the two stars form a triangle. The two sides of the triangle are 23.3 ly and 34.76 ly and their included angle is 76.04°. We can use the cos rule to find the third side, which is the distance between the two stars.
c² = a² + b² - 2abCos(C)
c² = (23.3)² + (34.76)² - 2(23.3)(34.76)Cos(76.04)
c = 36.88 light years.