Zend certified PHP/Magento developer

How to merging 2pdf’s with pdftk where output file have name one of them

I have many pair’s of PDF’s to merging with different names. I need to merging pair, without the first page of the second PDF and call the output file the name of the second PDF. First pdf name’s always beginning with “MX-” . Sorry for my english.
For example
pdftk A=MX-2021.09.29.pdf B=apple.pdf cat A1 B2-end output apple.pdf
or
pdftk A=MX-2021.08.21.pdf B=orange.pdf cat A1 B2-end output orange.pdf

Can anyone help me with this task?