Your equation (2) is wrong because you use Newton's 1st law in the tilted direction.
In that direction there is a component of acceleration, so Newton's 2nd law should have been used, not the 1st.
The point is that the horizontal acceleration can be split into
- a component along with (parallel to) the slope and
- a component perpendicular to the slope.
Choosing a coordinate system in the tilted direction perpendicular to the slope is thus a direction in which there is an acceleration component (the component perpendicular to the slope). This acceleration component must be included in any Newton's laws you set up - meaning, you now must use Newton's 2nd law $\sum F=ma_\perp$ (with $a_\perp$ being the component of $a$ in that direction) rather than Newton's 1st law $\sum F=0$ since there is an acceleration component present.
Since we are more used to work with force components than with acceleration components, you will often see teachers and answer sheets pick a coordinate system that fits the acceleration - and thus not necessarily one which is tilted along with the slope. In that way they avoid acceleration components and only have the full acceleration along one axis and none along the other.
You don't have to choose such a fitting coordinate system, of course. You can choose the tilted one, if you like - but then you just must include this acceleration component along with both tilted axis directions. That means Newton's 2nd law in both directions.