Lunisolar calendars on earth all exist to facilitate the same thing, allowing you to use the moon as a timekeeping tool while keeping the months in consistent seasons of the solar year. If you are a person in ancient greece, you want to make sure that Hekatambion always happens at the start of the summer, Poseideon is always in the middle of winter, and so on, so that you know how the weather is going to change, when to harvest, when to plant, etc. based on which lunar month it is. On earth, you need to slot an extra month in there every few years to keep things lined up because the lunar year drags behind the solar year by about 11 days, and this is what things like the metonic cycle are used for. You get a little more than a month behind every three years, so you need to add a month every 2-3 years, with whether it is 2 or 3 varying on a 19 year cycle.
It's not a foregone conclusion that you have to use every celestial body you have to make calendars. In the case of earthly lunisolar calendars, we have one celestial body with a consistent, trackable phase period that is convenient for making months out of if you don't have fancy modern clocks, the moon, and another whose relative position decides how your crops will grow and whether you will freeze to death, the sun, so we try to line them up so we can chop the year up into manageable months that still tell us when to plant and when to hunker down.
If you have two moons and a sun, a lot of people will probably just decide to use the one that is the easiest to line up with the solar year and may ignore the other one for practical purposes. You don't need to account for both moons in your calendar just because you have two moons. The Egyptians set their calendar by where Sirius was in the sky but, despite being able to see Sirius, no one else really thought to keep time with it. Our modern calendar doesn't care about the moon or stars at all. It just tracks the sun and divides the months up semi-arbitrarily to get roughly equal lengths that are consistent year to year. Most civilizations would probably use the easiest moon to fit into the year, probably the one whose offset from the solar year is a ratio of it's phase period that is easiest to work with. The moon is basically a giant sun dial in these systems, and you can choose to look at the sun dial that is easier to read rather than always having to pay attention to both of them, though some cultures will inevitably do that or choose to focus on the more cumbersome moon for various reasons such as culture, religion, or geography.
Our moon has a 29.5 day phase period and an 11 day offset from the solar year, but if we had a second one whose phases cycled every 40 days and whose year was 5 days behind the solar year, most lunisolar calendars would probably track that one instead because you can just drop in an intercalary month every 8 years instead of having to muck around with something like a metonic cycle. And if we had a second moon that you needed a 37 year cycle to keep lined up with the seasons, then most societies probably keep using the one with the 19 year cycle. Some civilizations may decide to use the other moon. Others may use the primary moon for their primary calendar while having another calendar based on the secondary moon to track festivals related to that moon's deity or something. Hell, maybe the secondary moon's calendar is just lunar, rather than lunisolar, and doesn't use intercalation because it's not used for purposes where seasons matter. Still others may go extra crazy and develop super complicated calendars based on the motions of both moons.
If you are going with a lunisolar calendar and not some sort of crazy lunilunisolar calendar that has no earth equivalent, it probably wouldn't actually work that much different from similar calendars found here. Decide on a lunar year, a lunar month, and a solar year, and then figure out when you need to slot in extra months to keep the seasons from drifting. The big difference would probably just be that there would be more variation in calendars because different people may follow a different moon for different reasons, and that this planet's version of crazypants astronomers like the Egyptians or the Mayans may have even more calendars tracking more things than their earthly equivalents.
If you are looking for logic on how to set cycles like those, you can look at the metonic cycle for inspiration. The length of a solar year is 365.24 days. The length of a lunar month is 29.53 days. If you just kept trying multiples of years divided by 29.53 until you got something close to a whole number, you could come up with the approximate length of your cycle. In this case it's (19 X 365.24)/29.53 = 235.0003, so there are 235 lunar months in 19 solar years, or at least close enough to that that it will keep your seasons in place. Then it's just doing the fenagling to figure out where to stick your long years in that cycle. In this case, there are 12-13 new or full moons in a given solar year. 19 X 12 = 228, so we need 7 13 month years somewhere. They need to be 2-3 years apart because we are falling a little more than a month behind every 3 years, so you try sticking 7 extra months in a 19 year cycle 2-3 years apart until you get a cycle that looks good and repeats. This same sort of formula could be used with different numbers stuck in, but there is going to be some trial an error no matter what. There is no formula, even for a particular calendar type, that will let you plug in numbers and spit out a calendar.
If I were to write this out in a semi-algorithmic way, it would be:
- Select a solar year length, a lunar month length, and figure out how many months occur in a solar year.
- See what the offset is between the number of days in the solar year and the number of days in the lunar year and see how many years it will take before you are a month behind.
- Check (numYears X daysInYear)/daysInMonth for every value of numYears until you get a whole number (or really really close to a whole number). Now you have the number of months and years in your cycle.
- Check numYears * monthsInYear to see how many months would be in your cycle with no long years. Whatever the difference is between that number and the result of the previous step is how many long years you need.
- Try plugging in long years spaced according to the offset found in step 2 until you get a set of long and short years that has the right numbers of each, keeps its spacing, and repeats.
Note: Usually the intercal month falls at the same time every leap year but it doesn't have to. The romano-british Coligny Calendar, for example, alternates between intercalating at the start and middle of the year, so you can play around as long as your spacing falls within the wobble given by your offset.
Another note: As pointed out by @Nosajimiki in the comments, it's not entirely true that our calendar doesn't care about the stars, as the constellations are used as a reference point for tracking the sun's motion. I meant more that it's not sidereal in the sense of the egyptian calendar where you are tracking a star instead of the sun or dependent on moon phases like a lunisolar calendar. Solar calendars can be substantially more arbitrary than ours. The Greek State Calendar (distinct from the lunisolar planting and festival calendar), for example, just divided the year into ten 36 day months, with the extra 5 days being scattered differently in different places and times in their history, so that calendar really had nothing to do with the stars in a way that isn't really true for ours. Months are totally arbitrary and just meant to split up time.
@Nosakijimi also makes a good point in their own answer about lunisolar calendars needing knowledge of the solar year to come into existance, and so many cultures that use them also have a solar calendar. The fact that most cultures throughout history have used multiple calendars for different purposes is something I don't think I've ever seen reflected in fiction, so it would be kind of cool to see a diverse set of calendar systems all used side by side like various ritual, planting, and state calendars have been throughout history.
Solar calendars have the benefit of being much more precise, but they need specialists to produce since you have to precisely track the motion of the sun relative to the stars in the background while both things are spinning around you due to the rotation of the earth. Lunar calendars are easier to read. You just look at the phase of the moon to see what day it is and count the moons to see what month it is, but also less precise, both because of the day level resolution of the moon phases and the fact that your months are jumping back and forth due to lunar year offset and intercalation. Because of this, a lot of cultures will use lunisolar calendars for the masses while using precise solar calendars for people who can afford to have a calendar on their wall or lunisolar calendars for festivals and solar calendars for planning or lunisolar calendars in rural areas but solar calendars in the city and so on. Even in cultures that have dispensed with using the moon to keep time, it may still rear its head from time to time for historical reasons. Easter, for example, is timed based on a lunisolar framework even though we don't keep time that way any more because it's super old and the date was set back when we did. Thinking about which calendars might be used for which things, given the particularities of economic systems, class, culture, population distribution, and other such things in your specific fictional society, could make an interesting worldbuilding challenge that I don't think I've ever seen an author take the time to do before.