If in 2D only, plot the 3 points on the same rectangular axes, so that you'd know how to get the angle between the two rays. For simplicity, put the corner of the angle on the origin (0,0).
Use the slopes of the rays. The slope of a line is the tangent of the angle made by the line with the horizontal axis, so the angle of the line with the horizontal axis is the arctangent of the slope.
So the angle between the two rays is actan(m1) minus arctan(m2).
Be careful with the signs of the slopes m1 and m2.