I suspect that most people who are new to this don't fully understand how results like ##\hat p\hat x\psi(x)=\frac{d}{dx}(x\psi(x))## follow from the definitions, so I will explain that. I will only consider the 1-dimensional case here, so our wavefunctions are functions from ##\mathbb R## into ##\mathbb C##. First note that when ##\psi## denotes such a function, ##\psi(x)## denotes a complex number in its range. So ##\psi(x)## never denotes a function. It's always just a number. This means that an operator like ##\hat x## or ##\hat p## acts on ##\psi##, never on ##\psi(x)##.
##\hat x## is defined by specifying a set of functions that will be its domain, and then specifying ##\hat x\psi## for all ##\psi## in that set. Since ##\hat x\psi## is a function with domain ##\mathbb R##, the way to do this is to specify ##\hat x\psi(x)## for all ##x\in\mathbb R##. (Note that ##\hat x\psi(x)## means ##(\hat x\psi)(x)##. ##\hat x## acts on ##\psi## and ##\hat x\psi## acts on ##x##).
The domain of ##\hat x## is the set of all square-integrable ##\psi:\mathbb R\to\mathbb C## such that the map ##x\mapsto x\psi(x)## is square-integrable. For each ##\psi## in that set, we define
$$\hat x\psi(y)=y\psi(y),$$ for all ##y\in\mathbb R.## (Note that it never matters what variable symbol is used in a "for all" statement. I chose to use y instead of x because I wanted to make it clear that we don't have to use the same symbol that's used in the notation for the position operator).
##\hat p## can be defined without even mentioning a variable (like x) that represents a real number. The domain of ##\hat p## is the set of all square-integrable ##\psi:\mathbb R\to\mathbb C## such that ##\psi'## is square-integrable. For all such ##\psi##, we define
$$\hat p\psi=-i\psi'.$$ I like to use units such that ##\hbar=1##. That's why I don't include ##\hbar## explicitly on the right-hand side.
The "product" ##\hat p\hat x## is defined as follows: For all ##\psi:\mathbb R\to\mathbb C## in the domain of ##\hat x##, such that ##\hat x\psi## is in the domain of ##\hat p##, we define
$$(\hat p\hat x)\psi=\hat p(\hat x\psi).$$ This definition is the reason why we don't need to insert parentheses when we write things like ##\hat p\hat x\psi##.
The other product ##\hat x\hat p## is defined similarly. The domain of the commutator is the intersection of the domains of ##\hat p\hat x## and ##\hat x\hat p##. Note that this means that the identity operator that we don't write out on the right-hand side of ##[\hat x,\hat p]=i\hbar## is the identity operator on that set, not the identity operator on the full set of square-integrable functions.
Now, let's use the definitions to evaluate ##\hat p\hat x\psi(x)##, where ##\psi## is an arbitrary member of the domain of ##[x,p]##.
$$\hat p\hat x\psi(x)=\hat p(\hat x\psi)(x)=-i(\hat x\psi)'(x)=-i\frac{d}{dx}(x\psi(x)).$$ The notation on the right means "-i times the derivative of the map ##y\mapsto y\psi(y)## evaluated at x". The definition of ##\hat x## tells us that that map is precisely what we denote by ##\hat x\psi##, so the right-hand side above means ##-i(\hat x\psi)'(x)##.
The rest of the calculation that proves the identity ##[x,p]=i## goes like this:
$$
\begin{align}&=-i\big(\psi(x)+x\psi'(x)\big)=-i\big(\psi(x)+\hat x(\psi')(x)\big)=-i\big(\psi(x)+\hat x(i\hat p\psi)(x)\big)\\
&=-i\psi(x)+\hat x\hat p\psi(x)=(-i+\hat x\hat p)\psi(x).
\end{align}$$ I used that ##\hat x## is linear here. I haven't proved that, but it's easy to do, using the definition of ##\hat x##.