May I treat units (e.g. joules, grams, etc.) in equations as variables? Suppose I have two units, Tonks, $T$, and Borks, $B$, as well as the equation $\frac{50T}{20B}=x$. May I manipulate the equation as though $T$ and $B$ were the kinds of symbols that we learned to manipulate in math class? For example:

\begin{align}
\frac{50T}{20B}&amp;=x\\
50T&amp;=20Bx\\
\frac{50T}{20}&amp;=Bx\\
\end{align}
Yes, you may. It is quite common to convert units into each other. The simplest conversion might be the prefixing of units, e.g. 
$$\mathrm{\frac{km}{m}}=1000 \Longleftrightarrow \mathrm{1~km = 1000~m}.$$

Another example is the interconversion of units of energy. In some parts of chemistry, it is still quite common to use calories, in others Joule, as a SI unit, has taken its place.
$$\mathrm{\frac{cal}{J}}=4.184 \Longleftrightarrow \mathrm{1~cal = 4.184~J}.$$

In principle, all units are defined to be constants, special numbers in a wider sense. You can treat them as such.