solved problem 4: Transform the Expression (String manipulation to convert to Polish Notation)