Yes I’m a stargazer and a long time ago used to compute precise ephemerides for my club, for sun, moon, planets and eclipses down to 1 arc second and 1 second in time. Unfortunately, the moons orbit isn’t as simple as your first post suggests, because all the orbital elements change - significantly - with time.
The book you want is “Astronomical Formulae for Calculators” by Jan Meeus. This presents the maths and you’ll have to write the code from that, NB I wrote most of that books maths in RPN for HP41CX.
Most important of all, Meeus provides worked examples for each section - and your code must produce results that agree to the last decimal place - otherwise you have an error somewhere.
A lot of astro apps are unfortunately written by people who don’t know how to verify the results.
One source you could use to check results is the NASA/JPL ephemeris at Orbits & Ephemerides.
Lastly the app that almost every serious stargazer uses is SkySafari, for MacOS, iOS and Android. It’s not cheap, but it is very mature. This also provides the data you seek, and you could use it to verify your results.
There are code libraries in C and other languages, but you will need to translate them to Xojo, and be able to verify the results carefully against the resources above.
Blindly translating from another language to Xojo and hoping it works is unlikely to succeed - you MUST verify the results.
The ultimate test, of course, is to pull out a telescope, look up, and measure where things are, and when.