Answer:
504 arrangements are possible
Step-by-step explanation:
Arrangements of n elements:
The number of arrangements of n elements is given by:

Arrangements of n elements, divided into groups:
The number of arrangements of n elements, divided into groups of
elements is given by:

In this case:
9 pens, into groups of 5, 3 and 1. So

504 arrangements are possible