What you can try is to find the vector direction of AB. Then, find the angle CBA by using the dot product of the vectors.

Have a sketch, BC is a line, AB is another line. Draw the angle CBA. Drop a perpendicular line from A to line CB.

Now, the perpendicular line, AB and BM, where M is the point where the perpendicular meets BC is a triangle.

Have now a right angled triangle, an angle and you can find the length AB. Use