$Y=g(X)$ as shown below. 
Find $f_Y(y)$ and $F_Y(y)$ in function of $f_X(x)$.
I began with writing $Y=g(X)$ as the following piecewise function: $ Y = \begin{cases} \ -b & \text{if } x < -a \\ bx/a & \text{if } -a \leq x \leq a \\ b & \text{if } x > a \end{cases} $
For the middle part I think it's simply $f_Y(y)= f_X(y)$ and $F_Y(y)=F_X(y)$.
For the constant parts of the functions I had the following: $f_Y(y)=\delta(y+b)$ when $x<-a$ and $f_Y(y)=\delta(y-b)$ when $x>a$. Is this correct? And how should I put these parts together to express the overall functions $F_Y(y)$ and $f_Y(y)$?
From the graph, $Y$ cannot be less than $-b$ nor greater than $b$. $$\Pr(Y<-b)=0\\ \Pr(Y>b)=0$$
However, at the points of inflection, we know $Y$ has a probability mass: $$\Pr(Y=-b)=\Pr(X\leq -a) \\ \Pr(Y=b)=\Pr(X\geq a)$$
In the interval between there is a linear relation between $X$ and $Y$ so $$\Pr(Y\le y)=\Pr(X\le ay/b) , \forall y\in (-b, b)$$
Putting it together, $$F_Y(y) = \begin{cases} 0 & y < -b \\ F_X(-a) & y=-b\\ F_X(ay/b) & y\in (-b, b) \\ 1 & y\ge b\end{cases}$$ By derivation, $$f_Y(y) = \begin{cases} 0 & y < -b \\ F_X(-a)\delta(y+b) & y=-b \\ a f_X(ay/b)/b & y\in (-b, b)\\ (1-F_X(a))\delta(y-b) & y=b \\ 0 & y> b\end{cases}$$ Thus: $$f_Y(y) = F_X(-a)\delta(y+b)+(1-F_X(a))\delta(y-b) + \frac{a f_X(ay/b)}{b}\operatorname{\bf 1}_{(-b,b)}(y)$$
$$F_Y(y) = F_X(ay/b)\operatorname{\bf 1}_{[-b,b)}(y)+\operatorname{\bf 1}_{[b,\infty)}(y)$$