In the figure below, two lines, $l_1$ and $l_2$, intersect to form angles at point $P$. Let the measure of angle $APB$ be $x$ degrees, where angle $APB$ is adjacent to angle $BPC$, which measures $2x + 10$ degrees. Additionally, angle $APC$ measures $40$ degrees. What is the value of $x$?