Expand the given function f into a Fourier series according to sines on the interval ($0$, $\pi$ ). Draw the graph of the function to which the obtained Fourier series in the set R converges.
I would like to ask if the graphs are correct? I would like to ask for help in calculating $bn$, unfortunately I do not know how to calculate it. Thank you!
$f(x)$ =\begin{cases}
0 \text { for } 0 < x \le \frac{\pi }{2},\\
x \text{ for } \frac{\pi }{2} < x < \pi
\end{cases}
We need to extend it to the range $<-\pi, \pi>$. Let's assume:
$f^*(x)$ = \begin{cases}
f(x) \text { for } x\in (0, \pi)\\
-f(-x) \text { for } x\in (-\pi,0)\\
0 \text { for } x\in (-\pi,0,\pi)\\
\end{cases}
And ...
$-f(-x)$ = \begin{cases}
0 \text { for } -\frac{\pi }{2}\le x<0\\
-x \text { for } -\pi<x<-\frac{\pi }{2}
\end{cases}
So $an$ = $0$. So let's calculate $bn$: $bn= \frac{1}{\pi }\int _{-\pi }^{\pi }\:f\left(x\right)sin\left(nx\right)dx$ = ...

No, your graph isn't correct. Since the Fourier series consists of $\sin$-terms only, the function is odd, but your graph shows an even function. Note that you correctly stated "$-f(-x)$" in the second line of your piecewise definition of $f^{*}$, but you didn't apply it correctly, because it does NOT yield "$-x$".
For calculating the coefficients $b_n$, you can use integration by parts. But first, due to the given definition of the function $f$ and its extension by its odd symmetry, we observe that $f(x)\sin(nx)$ is an even function, and therefore $$b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(nx)dx=\frac{2}{\pi}\int_0^{\pi}f(x)\sin(nx)dx=\frac{2}{\pi}\int_{\pi/2}^{\pi}x\sin(nx)dx,$$ since $f(x)=0$ for $x\in[0,\pi/2]$.
For example, let's set it up for $n=1$, and then apply integration by parts with $u=x$ and $dv=\sin(x)dx$, and thus $du=dx$ and $v=-\cos(x)$: $$b_1=\frac{2}{\pi}\int_{\pi/2}^{\pi}x\sin(x)dx=\frac{2}{\pi}\left[\left.-x\cos(x)\right|_{\pi/2}^{\pi}+\int_{\pi/2}^{\pi}\cos(x)dx\right]=\cdots$$
I hope you can take it from here.