'Scenekit calculate position at specific distance from a know position along a line

My math is a bit rusty... Using SceneKit I need calculate the coordinate of P3 at specific distance from P2.

let P1 = SCNVector(1,0,1)
let P2 = SCNVector(4,0,4)
let D =  = 1

pic



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source