From what I can see you start the exercise in /home/demo and the misc directory is a subdirectory of the directory work in the same directory.
So your cp command tries to copy the files to a file /home/demo/misc (in the first case) which would be syntactically correct but does not give you the desired outcome. It would at first copy the file /etc/php.ini into your home directory and rename it to misc, then it would do the same with /etc/vimrc, leaving you with only one copy of the file vimrc, named misc.
Your second approach is also correct, but only as long a directory /home/demo/misc exists, which here is not the case.
From an absolute point of view the directory is /home/demo/work/misc, from a relative point of view (with you starting in /home/demo, as stated in the excercise) the directory you want to copy into is work/misc. Adapt your copy command accordingly and you will pass the test.