Tony

It's a combination of math and some trial and error. Try it like this:  Start with any simulation that has the Sun, Earth, and Moon.
 Add an object named Spacecraft (or anything you like) in low Earth orbit using Objects > Create Objects. I choose a semimajor axis of 6578000 m which is 200 km above Earth's surface, but you can choose anything you like.
 Choose an arrive date. In the above simulation, I choose to arrive a few hours before the beginning of a solar eclipse, when a person on the Moon would watch the Earth cover the Sun.
 Open a "Distance and Velocity" box using menu View > Add Distance and Velocity Box. Set it for Moon and Earth.
 Open an "Orbital Elements Box" using menu View > Add Orbital Elements Box. Set it for Moon and Earth.
 Run your simulation to the desired arrive date and time, and note the exact Earth, Moon distance, and the Moon's True Longitude (3rd number from the bottom on the Orbital Elements box).
 Compute your spaceship's departure True Longitude by adding or subtracting 180 degrees from the Moon's True Longitude (whichever gives you a number between 0 and 359).
 Compute the semimajor axis of the transfer ellipse. It is ((semimajor axis of your low Earth orbit + Earth, Moon distance on the arrival date and time) / 2)
 Compute the transfer time using the formula: pi*sqrt(a^3/(G*M)), where a is the semimajor axis of the transfer ellipse, G is the gravitational constant, and M is Earth's mass. Watch your units. If you use 6.67x10^{11} for G, you must use kilograms and meters in this formula.
 Compute your approximate departure time by subtracting this amount of time from your arrival date and time.
 Compute your transfer velocity using Vt=sqrt(G*M*(((2)/(a1))((1)/(a2)))) where a1 is the semimajor axis of your low Earth orbit, and a2 is the semimajor axis of your transfer ellipse.
 Compute your low Earth orbit circular velocity using sqrt(GM/a1) where a1 is the semimajor axis of your low Earth orbit.
 Compute your delta V, which is your (transfer velocity  circular velocity).
 Start the simulation over again.
 Open an Orbital Elements box. Set it to Spacecraft and Earth.
 Run the simulation until you are within about 45 minutes of your approximate departure time.
 Wait until your spaceship reaches its departure True Longitude. It is now time to thrust.
 Accelerate in a prograde direction by delta V. You can do this with the "Thrust Box" menu View > Add Thrust Box, choose Spacecraft and Earth. Or you can do it with the AutoPilot using "Orient Prograde" and "Thrust". You must use Thrust twice to give "Initiate" and "Cutoff" times. You can either give the spacecraft an instantaneous boost by placing your deltaV value in the acceleration box, and making your cutoff time 1 second after your Initiate time, or you can divide it over time. For example, if your deltaV is 3 km/s, you could accelerate at 30 m/s/s for 100 seconds. Just begin 50 seconds before your true departure time.
 Watch your spacecraft leave lowEarth orbit and head for the Moon. If you did everything perfect, you might actually crash into the Moon. But since the Moon's orbit is inclined 5 degrees to the ecliptic, the odds are that you will pass under or over the Moon. This is not bad, since you'll still be close enough to the Moon at closest approach to brake into orbit. In my simulation, the Moon was close to the ecliptic (as it must be for an eclipse to happen), so I didn't have this problem. You'd like your closest approach to the Moon to be equal to the semimajor axis of your desired circular orbit, and in the same plane as your desired orbit. Rerun the simulation, tweaking your departure time, and / or your acceleration value until you pass the Moon in the desired location.
To break into Lunar orbit: At your closest approach to the Moon, thrust retrograde relative to the Moon until you are in circular orbit. You can determine the exact speed using sqrt(GM/a), where M is the Moon's mass and a is your desired semimajor axis. Or you can open an Orbital Elements box using menu View > Add Orbital Elements Box, choosing Spacecraft and Moon, and thrusting until your eccentricity is as close to 0 as you can get it. It's difficult to get it on your 1st try. But if you program it into Autopilot, you can save your simulations and tweak the numbers and try again until you get it right.
