How can i make this

to be output like this

tried diferrent things what i read on goagle nothing works thanks in advance

to be output like this

tried diferrent things what i read on goagle nothing works thanks in advance
