Maybe the easiest non-trivial case to consider is when one has a double cover $f \colon X \to Y$ of smooth projective varieties. Such a double cover is defined by a smooth divisor $B$ in $Y$ which is $2$-divisible in the Picard group of $Y$, and by a choice of a square root $L$, namely $L^2 =B$. Then
$f_* \mathcal{O}_X=\mathcal{O}_Y \oplus L^{-1}$.
Now $$f_* \mathscr{O}_X=\mathscr{O}_Y \oplus L^{-1}.$$ Now take a line bundle $\mathcal{O}_X(D)$$\mathscr{O}_X(D)$ in $X$.
Then $f_{*} O_X(D)$$f_{*} \mathscr O_X(D)$ is a rank $2$ vector bundle on $Y$, and its Chern classes can be recovered in terms of $D$ and $L$ by using Grothendieck-Riemann-Roch. I think these computations were first carried out by Schwarzenberger in the case of smooth surfaces, see [Vector bundles on algebraic surfaces[Vector bundles on algebraic surfaces and Vector bundles on the projective plane, Proc. London Math. Soc. 1111 (1961)] and [Vector bundles on the projective plane, same journal].
Proposition
Let $f \colon X \to Y$ and $L$ be as above, $D$ a divisor on $X$.
Proposition. Let $f \colon X \to Y$ and $L$ be as above and let $D$ be a divisor on $X$.
(1) We have theThe following equality holds in $\textrm{Pic}(Y)$$\textrm{Pic} \, Y$:
$c_1$ $(f_* O(D))$= $[f_* D]-L$.$$c_1 (f_* \mathscr{O}_X(D))= [f_* D]-L.$$
(2) We have theThe following equality holds in $H^4(Y, \mathbb{Z}[1/2])$$H^4(Y, \, \mathbb{Z}[1/2])$:
$c_2$ $(f_* O(D))$= $1/2((f_* D)^2-f_*(D \cdot D)-(f_*D) \cdot L)$.$$c_2 (f_* \mathscr{O}_X(D))= 1/2 ((f_* D)^2-f_*(D \cdot D)-(f_*D) \cdot L ).$$