Late may is good weather, rainy season is already over.
2 days in Machu Picchu or 2 days in Sacred Valley? Hard to answer.
You can visit entire Machu Picchu in one day. But if you want to climb the Huayna Picchu, you need 2 days. Now, since your kids are 14, 12, and 9, Huayna Picchu would be hard for the youngests.
so I would spend 2 days in Sacred Valley. I assume you will go to Machu Picchu on day 6 from Ollantaytambo. So a 2nd day in Sacred Valley would be good to visit Chincheros, Moray and mayba Maras (these places are not within the valley but very close).
Pisac is another town in the valley that is a must. The market probably will not be interesting for your kids but the ruins on the top of the mountain are. The views from there are breathtaking aAnd the road is not so hard. At the sacred valley there are rafting tours, too. Though again maybe not for the youngest kids.
About the last question, thinking in the kids.. probably the jungle will be more exciting than Sacred valley. I'd suggest you do more research of the activities available thru or near your lodge. I've not been there so I can't recommend any.