What to understand by $\langle \phi | \hat{A}|\psi \rangle$? What to understand by $\langle \phi | \hat{A}|\psi \rangle$? Should it be understood as $(\langle \phi | \hat{A})|\psi \rangle$ or as $\langle \phi | (\hat{A}|\psi \rangle)$?
EDIT:

I could not understand answer by @mike stone below perhaps because I have not studied functional analysis and know only little bit of linear algebra. So I am rephrasing my question.
What I get from Mike's answer is that $(\langle \phi | \hat{A})|\psi \rangle$ and $\langle \phi | (\hat{A}|\psi \rangle)$ are the same thing. So my question now is, how can we prove using methods of linear algebra that
$$(\langle \phi | \hat{A})|\psi \rangle = \langle \phi | (\hat{A}|\psi \rangle)$$
Perhaps it would get easier answers for me. :)
 A: Both.
Recall that a  linear map $A:V\to W$ automatically induces a  map $A^*:W^*\to V^*$ where $V^*$ is the dual space of $V$.
Given
$f\in W^*$ we can evaluate $f(A(x))$ for any $x$ in $V$,
and so $f(A(\phantom x))$ is an element of $V^*$ that we
may denote by  $A^*(f)$.  Thus,
$$
A^*(f)(x) = f(A(x)). \qquad (\star)
$$
In function analysis the  operator $A^*$ is usually called the conjugate of $A$. (Warning:  $A^*$ is   not  the "Hermitian conjugate" of $A$. The Hermitian conjugate is a map $V\to V$ and needs an inner product for  its definition).
The word "conjugate"  and the
symbol  $A^*$  is  rather unfortunate as it   has
the potential for generating confusion  ---  not least because the $(\ldots)^*$ map is linear. No complex
conjugation is involved. Thus
$$
(\lambda A+\mu B)^*= \lambda A^*+\mu B^*.
$$
Dirac notation deftly sidesteps this notational problem by  writing   $\langle {\psi}|A$ for the action of the conjugate of  the operator $A:V\to V$ on the
bra vector $\langle {\psi}|\in V^*$. After setting  $f\to \langle\psi|$ and
$x \to| \chi\rangle $, thje equation $(\star)$
therefore   reads
$$
\left(\langle{\psi}|A\right)|{\chi}\rangle =
\langle{\psi}|\left(A|{\chi}\rangle \right).
$$
This shows that it does not matter where we place the
parentheses, so Dirac simply  drops them and uses one symbol $\langle{\psi}|{A}|{\chi}\rangle $ to represent  both sides.
Dirac notation thus  avoids the non-complex-conjugating
"$*$" by  suppressing   the distinction between an operator and its
conjugate. If, therefore, for some reason we need to make the distinction, we
cannnot  use Dirac notation.
A: The equality
\begin{equation}\tag{1}
   (\langle \phi | A)|\psi \rangle = \langle \phi | (A|\psi \rangle)
\end{equation}
is trivial if we recall how the LHS and the RHS are defined:

*

*$(\langle \phi | A)|\psi \rangle$ is the image of $|\psi\rangle$ under the function $\langle\phi|\circ A$ and

*$\langle \phi | (A|\psi \rangle)$ is the image of $[$the image of $|\psi\rangle$ under the function $A]$ under the function $\langle\phi|$.

In other words, $(1)$ is simply the definition of the composition of two functions. Mike Stone simply pointed out that $\langle\psi|\circ A$ equals the image of $\langle\psi|$ under the dual of $A$...
