Estimate of a weak solution in a nonhomogeneous equation 
$\textbf{Problem}$ Let $\Omega \subset \mathbb{R}^n$ be open, bounded and connected with $\partial \Omega\in C^1$. For each $i,j=1,\cdots,n$, assume that $a_{ij},b_i,c \in L^{\infty}(\Omega)$ (real valued function) , and assume that there exists a constant $\mu \in (0,1)$ satisfying
  \begin{align*}
\mu \vert \xi \vert^2\leq \sum_{i,j=1}^n a_{ij}\xi_i\xi_j \leq \frac{1}{\mu} \vert \xi \vert ^2 \; \textrm{a.e. in } \Omega, \; \textrm{ for all } \xi\in \mathbb{R^n}
\end{align*} 
  Define 
  \begin{align*}
Lu:=-\sum_{i,j=1}^n\partial_{j}(a_{ij}\partial_iu)+\sum_{i=1}^nb_i \partial_iu+cu
\end{align*}
  For given functions $f\in L^2(\Omega)$ and $g\in H^{1}(\Omega)$, suppose that $u \in H^1(\Omega)$ is a weak solution to the following boundary value problem 
  \begin{align*}
\begin{cases}
Lu=f & \textrm{ in } \Omega \\
u=g & \textrm{ on } \partial \Omega
\end{cases}
\end{align*}
  If the homogeneous boundary value problem
  \begin{align*}
\begin{cases}
Lu=0 & \textrm{ in } \Omega \\
u=0 & \textrm{ on } \partial \Omega
\end{cases}
\end{align*}
  has only trivial weak solution, then prove that there exists a constant $C>0$ (independent of $u,f$ and $g$) so that 
  \begin{align*}
\Vert u \Vert_{H^1(\Omega)} \leq C(\Vert f \Vert_{L^2(\Omega)}+\Vert g \Vert_{H^1(\Omega)})
\end{align*}

$\textbf{Attempt}$
Take $w:=u-g $. Then, $w$ satisfies the following boundary value problem
\begin{align*}
\begin{cases}
Lw=f-Lg & \textrm{ in } \Omega \\
w=0 & \textrm{ on } \partial \Omega
\end{cases}
\end{align*}
We get $w \in H^1_0(\Omega)$. Also, 
\begin{align*}
\Vert u \Vert _{H^1(\Omega)} &= \Vert w+g \Vert_{H^1(\Omega)}\\ 
&\leq \Vert w \Vert_{H^1(\Omega)} + \Vert g \Vert_{H^1(\Omega)}\\
\end{align*}
($\textbf{Update}$) We remain that $\Vert w \Vert_{H^1(\Omega)}$ is bounded by $\Vert f \Vert _{L^2(\Omega)}$ and $ \Vert g \Vert_{H^1(\Omega)}$. 
Define a bilinear map $B[\cdot,\cdot]$ from $H^1(\Omega)$ to $H^1(\Omega)$ by 
\begin{align*}
B[w,v]:= \int_{\Omega} \sum_{i,j=1}^n a_{ij} \partial_i w \partial_j v +(\sum_{i=1}^n b_i\partial_i w + cw) v \; dx 
\end{align*}
Then, we easily check that 
\begin{align*}
B[w,w]=\int_{\Omega} fw \; dx -\int_{\Omega} \sum_{i,j=1}^n a_{ij} \partial_i g \partial_j w +(\sum_{i=1}^n b_i\partial_i g +cg)w \; dx
\end{align*}
$\textbf{Note}$ We have the following properties:
\begin{align*}
&(1) \; \beta \Vert w \Vert_{H^1(\Omega)}^2 \leq B[w,w]+\gamma \Vert w \Vert _{L^2(\Omega)}^2 \; \textrm{for some constants }\beta>0, \gamma\geq 0 \\
&(2) \; \Vert w \Vert_{L^2(\Omega)}\leq C_p \Vert Dw \Vert_{L^2(\Omega)} \; \textrm{(Poincare's inequality)}\\
&(3) \; \Vert w \Vert_{L^2(\Omega)} \leq \Vert w \Vert_{H^1(\Omega)},\; \Vert Dw \Vert _{L^2(\Omega)} \leq \Vert w \Vert_{H^1(\Omega)} \\
&(4) \; ab\leq \epsilon a^2 +\frac{b^2}{4\epsilon} \; (a,b>0, \epsilon>0) \; \textrm{(Cauchy's inequality with }\epsilon)
\end{align*}
By using the properties and Holder's inequality, I induced 
\begin{align*}
\beta \Vert w \Vert_{H^1(\Omega)}^2 \leq \Vert f \Vert_{L^2(\Omega)} \Vert w \Vert _{L^2(\Omega)} +C_1\Vert g \Vert_{H^1(\Omega)}\Vert Dw \Vert_{L^2(\Omega)} +C_2 \Vert g \Vert _{H^1(\Omega)} \Vert w\Vert_{L^2(\Omega)} +\gamma \Vert w \Vert _{L^2(\Omega)}^2  
\end{align*}
However, I stuck $\Vert w \Vert_{H^1(\Omega)}$ is bounded by $\Vert f \Vert_{L^2(\Omega)}$ and $\Vert g \Vert_{H^1(\Omega)}$ because of the last term $\Vert w \Vert_{L^2(\Omega)}^2$
Any help is appreciated...
Thank you!
 A: I'm not sure if you can apply said theorem directly, as certainly $Lg$ needs not lie in $L^2$ in general. However, you can replicate the argument to generalise the result to this situation. In particular the proof using a blow-up argument goes through with minimal modifications.

First observe that for any such $u, f, g,$ then by standard elliptic estimates (testing against $v = u-g$) there exists $C > 0$ independent of $u,f,g$ such that,
$$ \lVert u \rVert_{H^1(\Omega)} \leq C\left( \lVert u \rVert_{L^2(\Omega)} + \lVert f \rVert_{L^2(\Omega)} + \lVert g \rVert_{H^1(\Omega)}\right). $$
So it suffices to find $C>0$ such that,
$$ \lVert u \rVert_{L^2(\Omega)} \leq C\left( \lVert f \rVert_{L^2(\Omega)} + \lVert g \rVert_{H^1(\Omega)}\right). $$
So how do we do this? Suppose otherwise, so we assume any solution to the homogenous problem,
\begin{align*}
  \begin{cases}
    Lu=0 & \textrm{ in } \Omega \\
    u=0 & \textrm{ on } \partial \Omega
  \end{cases}
\end{align*}
is necessarily zero. Also suppose the estimate does not hold, so we can find $u_k \in H^1(\Omega),$ $f_k \in L^2(\Omega)$ and $g_k \in H^1(\Omega)$ such that for each $k,$
\begin{align*}
  \begin{cases}
    Lu_k=f_k & \textrm{ in } \Omega \\
    u_k=g_k & \textrm{ on } \partial \Omega
  \end{cases}
\end{align*}
and we have the inequality,
$$ \lVert u_k \rVert_{L^2(\Omega)} > k \left( \lVert f_k \rVert_{L^2(\Omega)} + \lVert g_k \rVert_{H^1(\Omega)} \right). $$
We will also assume each $\lVert u_k \rVert_{L^2(\Omega)} = 1,$ which is always possible by rescaling. We will show this gives rise to a contradiction.
Note that we get $\lVert f_k \rVert_{L^2(\Omega)} + \lVert g_k \rVert_{H^1(\Omega)} \leq \frac1k \rightarrow 0,$ so we get $f_k \rightarrow 0$ in $L^2$ and $g_k \rightarrow 0$ in $H^1(\Omega).$ So by our earlier estimate,
$$ \lVert u \rVert_{H^1(\Omega)} \leq C\left( \lVert u \rVert_{L^2(\Omega)} + \lVert f \rVert_{L^2(\Omega)} + \lVert g \rVert_{H^1(\Omega)}\right) \leq C\left(1+\frac1k\right) \leq 2C. $$
Thus the sequence $(u_k)$ is uniformly bounded in $H^1(\Omega).$ By the Rellich-Kondrachov theorem, there exists a subsequence $(u_{k_j})$ such that $u_{k_j} \rightharpoonup u$ weakly in $H^1(\Omega)$ and $u_{k_j} \rightarrow u$ strongly in $L^2(\Omega).$ We claim that $u$ solves the homogeneous problem; indeed if $v \in H^1_0(\Omega)$ we have,
\begin{align*}
  \int_{\Omega} A\nabla u \nabla v + b\nabla u v + cuv \,\mathrm{d}x &= \lim_{j\rightarrow \infty} \int_{\Omega} A\nabla u_{k_j} \nabla v + b\nabla u_{k_j} v + cu_{k_j}v \,\mathrm{d}x \\
  &= \lim_{j \rightarrow \infty} \int_{\Omega} f_{k_j}v \,\mathrm{d}x \\
  &= 0.
\end{align*}
Also the trace operator preserves weak limits (being linear and bounded), so $\operatorname{tr} u = 0.$ Thus by the uniqueness assumption, we get $u=0$ in $\Omega.$ However we also have $\lVert u \rVert_{L^2(\Omega)} = \lim_{k \rightarrow \infty} \lVert u_{k_j} \rVert_{L^2(\Omega)} = 1,$ which gives our desired contradiction.

There is another approach, which might be closer to what you are looking for. For this view $L$ as a linear operator,
$$ L : H^1(\Omega) \rightarrow H^{-1}(\Omega). $$
Then $u \in H^1(\Omega)$ solves the non-homogenous problem if and only if $u-g \in H^1_0(\Omega)$ and $L(u-g) = f - Lg.$ Hence it suffices to show that if $w \in H^1_0(\Omega),$ we have,
$$ \lVert w \rVert_{H^1(\Omega)} \leq C \lVert Lu \rVert_{H^{-1}(\Omega)}. $$
Indeed if this holds, then for any solution $u$ to the non-homogenous problem, we have,
\begin{align*}
  \lVert u \rVert_{H^1(\Omega)} &\leq \lVert u - g\rVert_{H^1(\Omega)} + \lVert g \rVert_{H^1(\Omega)} \\
  &\leq C \lVert f - Lg \rVert_{H^{-1}(\Omega)} + \lVert g \rVert_{H^1(\Omega)} \\
  &\leq C\left( \lVert f \rVert_{L^2(\Omega)} + \lVert g \rVert_{H^{-1}(\Omega)}\right).
\end{align*}
In the last line we used the continuous embedding $L^2(\Omega) \hookrightarrow H^{-1}(\Omega),$ and the fact that $L$ is bounded as an operator $H^{1}(\Omega) \rightarrow H^{-1}(\Omega).$
So it suffices to prove an a-priori estimate for $L$ as an operator $H^1_0(\Omega) \rightarrow H^{-1}(\Omega).$
To do this we use some functional analysis. Note this essentially amounts to doing the same thing I did above, depending on how you prove the theorems I will quote.
By Lax-Milgram, for $\tau > 0$ sufficiently large we have the operator,
$$ L_{\tau} = L + \tau I : H^1_0(\Omega) \rightarrow H^{-1}(\Omega) $$
is invertible (here $I$ is the inclusion $H^1_0(\Omega) \hookrightarrow H^{-1}(\Omega)$). Now observe that for $f \in H^{-1}(\Omega)$ and $w \in H^1_0(\Omega)$ we have,
$$ Lu =f ,$$
if and only if,
$$ u - \tau L^{-1}_{\tau}Iu = L_{\tau}^{-1}f. $$
Now as the inclusion $I : H^1_0(\Omega) \hookrightarrow H^{-1}(\Omega)$ is compact by Rellich-Kondrachov, the operator $L^{-1}_{\tau}I$ is compact. So $T = \operatorname{id}_{H^{-1}(\Omega)} - \tau L^{-1}_{\tau}I$ is a Fredholm operator. Moreover $L = L_{\tau}T.$
Now by the Fredholm alternative (abstract functional analysis), we have $T$ is invertible if and only if it is injective, that is $Tu = 0$ if and only if $u = 0$ for $u \in H^1_0(\Omega).$ Noting $L_{tau}$ is an isomorphism, we have,
$$ L_{\tau}Tu = Lu = L_{\tau}0 = 0, $$
if and only if $u = 0.$ But we know this is true by assumption.
Thus for any $u \in H^1_0(\Omega)$ we get,
$$ \lVert u \rVert_{H^1_0(\Omega)} \leq \lVert T^{-1} \rVert \lVert L_{\tau}^{-1} \rVert \lVert L_{\tau}Tu \rVert_{H^{-1}(\Omega)} = C \lVert Lu \rVert_{H^{-1}(\Omega)}. $$

Remark: Note that in both cases, we have absolutely no idea what the constant $C$ is. In the former case a contradiction argument shows it exists, while in the latter case the constant is essentially conjured up using functional analysis magic (depending on how you prove the Fredholm alternative, there is either a contradiction argument or a Baire Category argument involved, or both).
In applications however, it is often useful to know more precise dependencies on the constants. For example subject to further assumptions (e.g. if we can apply the maximum principle), we may have $C$ only depends on things like $\mu$ on the $L^{\infty}$ norms of the coefficients. So often it's useful in practice to try and prove such an a-priori estimate directly, using additional information you have about your particular problem.

For a reference, see chapter 6 of the book 'Partial Differential Equations' by Evans. Although he often assumes higher regularity of his coefficients, it is not hard to modify the argument to this lower regularity setting.
