If(pre_nights = "yes"; departue date - pre-nights; departure date)
Pre_nights is a number field
It doesn't fit together:
First, "yes" is not a number - so if you expect pre_nights to contain "yes", make it a text field (or - preferably - use 1 for True, 0 or empty for False).
Next, subtracting "yes" from a date does nothing. I am assuming that pre_nights and pre-nights are the same field and that the difference is a typo - otherwise, pre-nights is not a valid field name.
Finally, it is not clear if the field program date is a Calculation field or a Date field with auto-entered calculated value - I'd suggest you make it a Calculation field with the result set to type Date.
Perhaps you meant to subtract pre_nights from departure date only if pre_nights contain a value? If so, then =
departure date - pre_nights
should be quite sufficient.