Change values of two numbers if given condition is met

Change values of two numbers if given condition is met