I want 2 output pins to working alternately
You can set pin 10 to run in “inverted PWM” mode, and leave
pin 9 in the default non-inverted mode. Pin 9 is the “OC1A”
pin of the AVR microcontroller (output compare of Timer 1,
channel A), whereas pin 10 is OC1B (channel B of the same
timer). Inverting the PWM mode of channel B is a matter of changing
a single bit in one of the control registers of Timer 1:
TCCR1A |= _BV(COM1B0);

You can do this once in setup(), the setting should persist. Then just
analogWrite() the same value to both pins. For some background on how
all this works, see the datasheet of the ATmega328P
microcontroller (the MCU at the hearth of your Uno),
especially section 16 “16-bit Timer/Counter1 with PWM” and table
16-3 “Compare Output Mode, Phase Correct and Phase and Frequency Correct
PWM”.