The correct option is A I would like to thank whoever it was that wrote that piece of music:
From, the given options here, we notice that the options are mostly split into two groups: one that uses "whoever" and the other uses "whomever." Here, let's ask the question "who wrote it?"- He/ him wrote it? The answer is "He wrote it." So, we need "whoever" and not "whomever." This eliminates B and C. E has a comma and hence eliminated because two complete sentences are joined here and 2nd sentence supports the first. Now, between A and D, A is the most direct and concise. So, A is the answer.