I have read the answers for both of these questions -Finding a point along a line a certain distance from another point and Find a point along line on Earth and I am trying to convert the transformations given in this question that I asked here - Trigonometric formula derivation into their spherical trigonometric versions. All longitudes and latitudes have been defined with respect to the WGS84 datum
$P(\lambda^`,\phi^`) $ lies on a geodesic curve from $O(\lambda_0,\phi_0) $ and I want the coordinates of $R(\lambda,\phi) $ which presumably lies along the geodesic distance between P and O. So O is what is called the nadir point of the satellite on the earth's surface. P is the coordinates of a ray at a slant angle $\theta$ from the location of the satellite above the earth's surface.
I have also been the height and from that I am presuming the arc length PR can be deduced by the following equation $$ h * tan(\theta) $$ and this arc lies along the geodesic OP.
I am wanting to find out the coordinates of $R(\lambda,\phi) $ where R is the coordinates of the actual cloud top position but I have been given the coordinates of P which is the apparent cloud top position. Hence a parallax correction needs to be applied.
I believe the Matlab/Octave function reckon does what I want but I want to do this in my own programming language and hence I cannot use that API call. I would like to do this from first principles.

You could try the following approach:
First, calculate the geocentric xyz cartesian coordinates of the satellite and point P with the spherical coordinate system formulas. Then you can find the intersection between the satellite line of sight and a sphere with a radius = Earth radius + height of cloud top, using these formulas. Then convert the xyz coordinates of the intersection back to lat lon with the cartesian-to-spherical conversion. This will give you the lat lon of your cloud top.