Let $S_k(\Gamma_1(N))$ denote the space of weight $k$ cusp forms on $\Gamma_1(N)$. The set $$\mathcal{B} = \{f(n\tau) : f \textit{ is a newform of level $M$ with $nM \mid N$}\}$$ a basis of $S_k(\Gamma_1(N))$. Let $g \in S_k(\Gamma_1(N))$ be a normalized eigenform. Then there exists a unique newform $f$ of level $M \mid N$ such that $a_p(f) = a_p(g)$ (here $a_n(h)$ denotes the $n$-th Fourier coefficient of a form $h$) for all primes $p \not\mid N/M$. I want to show that $$g(\tau) = \sum_{d \mid N/M}c_df(d\tau)$$ for some $c_d \in \mathbb{C}$.
Expression $g$ in the basis $\mathcal{B}$, we have $$g(\tau) = \sum_{i,j}c_{i,j}f_i(n_{i,j}\tau), \hspace{.5cm} c_{i,j} \in \mathbb{C}$$ where each $f_i$ is a newform of level $M_i \mid N$ and each $n_{i,j} \mid N/M_i$. Let $f_k$ be the newform such that $a_p(g) = a_p(f_k)$ for all $p \not\mid N/M_i$. Given a prime such that $p \not\mid N$, consider the linear operator $$T = \prod_{t \neq k}(T_p - a_p(f_t)),$$ where $T_p$ is the $p$-th Hecke operator $T_p$ and $a_p(f) = a_p(f) \cdot \textrm{id}$. Since $p \not \mid N$, the Hecke operator $T_p$ is the same at all levels dividing $N$. Applying $T$ to both sides of our expression for $g$ in the basis $\mathcal{B}$ and recalling that $T_p(h) = a_p(h)h$ for a normalized eigenform $h$, we obtain
$$\prod_{t \neq k}(a_p(g) - a_p(f_t)) \cdot g = \sum_{i,j} \prod_{t \neq k}(a_p(f_t) - a_p(f_j)) \cdot c_{i,j}f_i(n_{i,j}\tau)$$
The terms with $i \neq k$ on the right-hand side vanish and $a_p(f_k) = a_p(g)$, thus $$\prod_{t \neq k}(a_p(g) - a_p(f_t)) \cdot g = \prod_{t \neq k}(a_p(g) - a_p(f_t)) \cdot \sum_{j} c_{k,j}f_k(n_{k,j}\tau)$$ We are thus done if we can choose a prime $p$ such that $p \not\mid N$ and $a_p(f_k) \neq a_p(f_t)$ for all $t$. I know that each fixed $t$ we can choose such a prime by strong multiplicity one, but can we choose a prime that works for all $t$ simultaneously?
I realized we can just pick primes $p_t \not\mid N$ such that $a_{p_t}(g) \neq a_{p_t}(f_t)$ for $t \neq k$ by strong multiplicity one and the uniqueness of $f_k$. Then the proof goes through if we define the operator $T$ by $$T = \prod_{t \neq k} (T_{p_t} - a_{p_t}(f_t)).$$