Thanks for posting the reply. I was late in responding because I wanted to be sure I did not misunderstand the question. I think I did not.
The question says "first" and "last" are request attributes. So even if placing 'out' before 'println()' statements in option D would be syntactically correct, it is still logically wrong as application.getInitParameter() gets you the context parameters and not the request parameters.
For retrieving request parameters, we need to use request object and thus option D would continue to be a wrong choice after using the implicit object 'out'.