answer:45 walnuts
since you multiply the number of cashews (6) by 9 to get 54, you have to multiply the number of walnuts (5) by 9 to get 45