You are correct! You correctly calculated the theoretical yield of 45 g. You then divided the actual yield of 0.9 g by 45 g and multiplied by 100% to obtain the percent yield.