For the first one, a percentile rank is the percentage of students who scored below someone. With 8 students, Katie's score is the second-highest, so six students scored below her, so her rank is 6/8*100=75%. Anijah's is the second-lowest, so her rank is 1/8*100=12.5%.
For the second, the z-score is the amount of standard deviations above the mean a given value is. Lily's is (78-7.1)/4.3=1.63, and Johnae's is 2.36. Thus, Johnae scored better relative to other students, despite receiving a lower numerical score.