The process of judging the security of information stored in a password database is done with the assumption that an adversary (hacker) not only knows which cipher/encryption method you are using, but also that he has stolen a copy of your password database. Knowing those things, the hacker wishes to discover password so he can pretend to be a valid user.
In the problem described, the we assume the hacker has stolen the database and can see the values of both S and Y for every user contained in the database. The difference between the two methods is in what the value of Y consists of.
In method 1, [password] is combined with [salt] and then that value is block-cypher encrypted with key [password].
In method 2, [salt] is combined with [password] and then that value is block-cypher encrypted with key [salt].
The fact that the password and salt are mixed in different ways in the two examples is irrelevant; the critical fact you should notice is what key was used to create Y.
In method 1 the key used for encryption is password. The hacker doesn't know what the password is, since it has been encrypted before storing it inside Y in the database. In method 2 the key used for encryption is S. The hacker knows what S is, since it's right there in the database.
If method 2 is used, the hacker can decrypt Y immediately to discover password using the keyword S. If method 1 is used, he will have to break the encryption of Y without knowing the encryption key [password]. So method 1 is a more secure way of building a password database.