We use the number of linear extensions of a given poset and some partitions, in order to obtain formulas for the number of some restricted compositions of a given multipartite number into vectors whose components are integers in arithmetic progression. These formulas allow us to obtain some relationships between the number of restricted compositions of a positive integer