If you know the elevation at both ends, and you know the total length, then you can calculate the slope.
Then just multiply the slope X the distance from the unknown point to one of the two known end points
Then add or subtract that value to/from a known point.
For example:
Pt1 = 5,5,5
Pt2 = 5,15,8
Pt3 = 5,7.81245,?
The Hz distance between Pt1 and Pt2 = 10
The elevation diff between Pt1 and Pt2 = 3
The slope between Pt1 and Pt2 = 30%
The Hz distance between Pt1 and Pt3 = 2.81245
2.81245 * 30% = 0.843735
So the Z value of Pt3 = 5.843735