It's quite similar to 2D space. Consider a vector $v = B-A$ which you can imagine is the direction from $A$ to $B$. Hence for any point $C$ between $A$ and $B$ (inclusive of $A$ and $B$).
$C = A + tv$
where $t = 0$ implies $C = A$ and $t = 1$ implies $C = B$ and $t \in (0,1)$ are all the points in between (one of which is the desired $C$). As you can see, this representation is independent of the dimension of your space.
So, what's the value of $t$? Well, let the known distance from $A$ to $C$ be $d_{AC}$. Now, the distance between $A$ and $B$ or $d_{AB}$ is the magnitude of $v$ or $|v|$ which is nothing but
$d_{AB} = |v| = \sqrt{(a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2}$
(You can see that this formula for the Euclidean distance between two points is similar in 2D as well)
Therefore, $t = \large \frac{d_{AC}}{d_{AB}}$ and substituting $t$ and $v$ in the previous formula for $C$, we have:
$C = A + \frac{d_{AC}}{\sqrt{(a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2}}(B-A)$