Playing a card on Hanabi: choose the pile first, or play it and then check?
You announce the card you are playing, then it is played. Checking for legitimacy is a separate act. Play proceeds as follows:


Play the chosen card face-up on the table (not on a pile).
Check whether it can be legally placed on an existing pile. Do so if possible, increasing that pile by one.
Otherwise, check whether it can be legally placed to start a new pile (i.e. it is the first number one card in a colour). Do so if possible, starting a new pile.
Otherwise, discard the played card and lose a fuse token.


The ability to play a legal card before knowing precisely how it is legal, is intentional. Latter stages of the game rely increasingly on the tactical use and provision of information to others.

If it was necessary to know the precise pile on which to play a card before doing so in order to succeed, the game would be made far more difficult than it already is.


  In your example, you would play the Green-3, then, seeing it is a legal card on the Green pile, place it there.