Let $f:[a,b] \to \mathbb R$ such that the image is a finite set. Prove that $f$ is of bounded variation iff the set of discontinuities of $f$ is finite.
I didn't have problems with the forward direction:
Suppose $f$ is of bounded variation but the set of discontinuities is infinite. Note that, as the image is finite (I am not taking into account the case in which the cardinal is $1$), there is $m \in R>0: m\leq |y-z| \space \forall y,z \in Imf$ with $y \neq z$. Now, by hypothesis, $f$ is of bounded variation, this means that there exists $M>0$ for every partition $P=\{x_0,x_1,...,x_n\}$ of $[a,b]$,
$\sum_{k=1}^n |f(x_k)-f(x_{k-1})| \leq M$.
By the archimidean property of the natural numbers, there is $N \in \mathbb N: Nm>M$. Consider the partition $P=\{x_0,...x_n\}$ such that every $x_j$ is a point where $f$ is discontinuous. And now, consider $x'_j$ and $x'_{j+1}$: $|f(x_j)-f(x'_j)|\geq m$ and $|f(x_{j+1})-f(x'_{j+1})|\geq m$ and such that $x_j<x'_j<x'_{j+1}<x_{j+1}$ (by our previous assumptions, we can find points $x'_j, x'_{j+1}$ that satisfy these conditions).
Now consider the partition $P'=\{x_0,x'_0,x'_1,x_1,...,x'_{n},x_n\}$ and rename the elements of $P'$ such that $P'=\{y_0,y_1,...,y_t\}$. Then, by how we've constructed the partition, it's clear that M<$\sum_{k=1}^t |f(x_k)-f(x_{k-1})|$
I have no clue how to prove the other implication, could someone tell me if this approach is correct and give me suggestions to prove the remaining implication?
Your approach is correct. For the other implication, enumerate the points of discontinuity as $c_1<c_2<\dots<c_m$. On each subinterval $(c_j,c_{j+1})$ the function is continuous and has finite range; hence it is constant. (Think of the intermediate value theorem). Let $y_j$ be its value on this interval. Given any partition, consider to which subintervals the partition points belong; consecutive points in the same subinterval don't contribute to the variation.