A line is drawn from the origin $O$ to a point $P(x,y)$ in the first quadrant on the graph of $y=\frac{1}{x}$. From point $P$, a line is drawn perpendicular to the $x$-axis, meeting the $x$-axis at $B$. Express the perimeter of $OPB$ as a function of $x$.
I need help setting up the equation for this. Do I just need to determine the equations for each side of the triangle $(a, b, c)$, using the points given? So it would end up looking like $x + y + {}$ hypotenuse. Then wherever I see a $y$, I replace it with $\frac{1}{x}$, giving me $x + \frac{1}{x} + x^2 + (\frac{1}{x})^2$.