The CHOOSE/WEEKDAY combination at the end is what chooses the day. We find the first day of the month, and then WEEKDAY tells me what day of the week it is, using Sunday = 1, Monday = 2, etc. The CHOOSE function then takes that number, and we choose how many days we need to add. So, it the first day of month is Sunday, we need to add 3 days, if Monday, add 2, etc. That's what the "3,2,1,0,6,5,4" bit at the end is for.
The "+14" is what determines which instance of that day we want. Adding 0 gives first Wednesday, +7 is 2nd Wednesday, +14 is 3rd, etc.