Let $f:(X,d)\rightarrow(Y,d)$ be a map of metric spaces. Let $f$ be locally Lipschitz, that is, for each $x\in X$ then there exist an open ball $B_x$ containing $x$ and a constant $L_x$ such that $d(f(x),f(y))\leq L_xd(x,y)$ for all $x,y\in B_x$. Prove that if $X$ is compact then $f$ is Lipschitz.
My work: let $\{B_x :x \in X\}$ is a open cover of $X$. Since $X$ is compact the open cover admits a finite subcover. Let $L_j$ be the Lipschitz constant corresponding to $B_j$. Now my instinct tells me that I have to take the maximum of such constant. But it does not complete the proof. So I think I am missing some step. I need help to really understand this.