A 071

The answers to this question come from the Action parts of the rules for the Hide, Spot, Listen, and Move Silently skills. Of those, the perception skills are straightforward.
Quote Originally Posted by Spot
Action: Varies. Every time you have a chance to spot something in a reactive manner you can make a Spot check without using an action.
Quote Originally Posted by Listen
Action: Varies. Every time you have a chance to hear something in a reactive manner (such as when someone makes a noise or you move into a new area), you can make a Listen check without using an action.
If you're trying to cast a spell and remain undetected you're doing three different things:
  1. attempting to obscure the fact that you're casting a spell;
  2. moving and making noise as part of the spellcasting, both of which can be perceived even if the fact that you're casting a spell isn't detected; and
  3. trying to stay hidden.
The first part is covered by the Sleight of Hand check vs. an opposed Spot check, as described in Rules Compendium on page 117. That Spot check is specifically to notice that a spell is being cast.
Quote Originally Posted by Move Silently
Action: None. A Move Silently check is included in your movement or other activity, so it is part of another action.
You're making noise on purpose while casting a spell with verbal components, so your DM may impose a circumstance penalty to your Move Silently check. Move Silently is included in your movement or other activity, so you make this check along with your spellcasting action (usually a standard action), opposed by a passive Listen check.

Now the last and trickiest part. You can't easily "stay hidden", because that's not an option for the Hide skill.
Quote Originally Posted by Hide
Action: Usually none. Normally, you make a Hide check as part of movement, so it doesn’t take a separate action.
If you were hidden before spellcasting, that action is likely going to make you not hidden. Because Hide doesn't have a separate action, you must perform one of the limited set of actions which allows a Hide check to be included. Spellcasting isn't one of those actions unless it includes an attack roll; you're allowed to Hide while attacking. Minor Image does not qualify as an attack, so it won't let you Hide. Thus you will not get to oppose any passive Spot checks with Hide; if an enemy has line of sight to your position when you cast a spell, they will only fail to Spot you if they're particularly unobservant. (The Spot DC to see someone Large in plain sight is 0. The DC adjusts for your size, and the usual -1/10' distance penalties apply. However, only if you're still difficult for the observer to see ─ that is, they can't make the static Spot DC ─ will you remain hidden.)

Given that you're probably not remaining hidden, movement is the most common action type which allows a Hide check. You could use a move action to move at half speed and you won't incur a Hide check penalty, and you could even move back to your initial location if you want to Hide in the same place. Alternatively you could Hide as part of a 5' step if you hadn't moved anywhere. Since you'd be moving at the full speed for this operation (instead of half speed and only moving 2.5') your Hide check would involve a -5 penalty. For movement to your hiding place you would also need a separate Move Silently check.

Finally, remember you must satisfy the two Hide requirements every time to be allowed to make a check: (1) cover/concealment, and (2) not being observed. If you were observed while casting a spell, you pretty much need Hide in Plain Sight to be able to bypass that second requirement.