How to decide between vectors and it's components? Suppose we have following situation assume that both are kept over each other.

As $m$ experiences $N$ normal due to $M$ and $mg$ due to gravity. There no motion hence we can write: $mg-N\cos A=0\implies mg=N\cos A$.
Now consider this method, if we broke $mg$ perpendicular to inclined surface will equals to $mg\cos A$, also $M$ is fixed, this should be the force acting between $m$ and $M$, but $N\neq mg\cos A$ from above why?
If we draw FBD of $M$:

And take $N$ to be vector whose component is $mg$ then $N=mg\cos A$, which we got above.
So my question is how to decide which vector is component and which is not?
What I'm mistaking, please help.
 A: You have neglected that there is a horizontal force acting on the falling object exerted by the "wall" which if it was not there would mean that the falling object would accelerate in the horizontal direction. 
The same is true of the wedge where the ground exerts a force on the wedge which has both a horizontal and vertical component. 

So you must consider all the the forces on each of the objects. 
A: 
how to decide which vector is component and which is not

The components are those that are along your coordinate axes. If a vector is tilted, then it can be split in one part along the x-axis and one part along the y-axis - these are the components. There is nothing more to it.
You can then choose any coordinate system you want. The components will be different depending on that (and maybe the original vector is equal to one of it's components and it's other component equals zero).
The sole reason for components is that we often wish to sum up all force for example in each axis direction. All forces along the x-axis for example. So if a vector is tilted, then we only include it's component along that axis. Is it not tilted, then we just keep the whole vector (it equals it's component along that axis).
