Solution 1:

Let $X,Y$ be semimartingales and $\xi$ be an $X$-integrable process. Then,

$$\left[\int\xi\,dX,Y\right] = \int\xi\,d[X,Y]$$ and $$\left[\int\xi\,dX\right]=\int\xi^2\,d[X]$$

where $[\cdot, \cdot ]$ denotes the quadratic covariation of two processes and $[\cdot ]$ denotes the quadratic covariation of a process with itself.

The proof of such statements is much easier if you use the following definition of $[\cdot]$:

Given a stochastic partition ${\mathcal P} = \left\{0=\tau_0\le\tau_1\le\tau_2\le\cdots\uparrow\infty\right\}$, we define

$$[X]^{{\mathcal P}}(t) \equiv \sum_{n=1}^\infty\left(X(\tau_n\wedge t)-X(\tau_{n-1}\wedge t)\right)^2$$

Taking a sequence of such partitions such that the mesh of the partitions is going to 0 in probability as $n$ increases, we define $[X]$ as the following limit

$$ [X]^{{\mathcal P}_n} \xrightarrow{ucp}[X]$$

The "ucp" convergence is the uniform convergence on compacts in probability.