Make a wooden swing with material constraints
Yes, two 4x4’s would work fine to support two swings, provided 1) lumber is “Select Structural” grade and 2) fastened so they don’t rotate. 

1) Make sure there are no large knot holes so that it is of the highest grade of lumber. 

2) The “beam” is strongest when the 4x4’s are stacked on top of each other. 

To test my calculations, I’d try testing them out on some short blocks with a couple of children standing/sitting on them.