Control 3 LEDs with 2 pins

Please see attached picture.
I'm worried that arduino will "burn" or spoil when outputs A and B are both 1.

Thanks!

You need a seriese resistor for each of those LEDs, you always do. Once you have that there is no problem with the two outputs being high.

Noted with thanks!

A 4028 binary to decimal decoder ic will do the job... the other way might be to use logic gates and build your own.