Here is one way.

If AC = BC, then the C must be in the middle.

Let us say A is to the left of C, so B is to the right of C.

If C is at 5, then the origin 0 is 5 units to the left of C.

A is 12 units to the left of C, so A is (12 -5) = 7 units to the left of 0.

Therefore, the coordinate of A is negative 7, or -7.

B is 12 units to the right of C, so B is (5 +12) = 17 units to the right of 0.

Therefore, the coordinate of B is positive 17, or 17 only.

------------

Reminder, all numbers to the left of the origin 0 are negative, all to the right of the origin are positive.