Whenever a numerical value is given in terms of some units, the slogan to remember is:
This applies to any numerical value anywhere in an equation, unless that number is a dimensionless coefficient. If the numerical value is part of a larger expression, a good practice is to group the number and its units in parentheses, to avoid any ambiguity. Some correct examples:
F_x = m * a_x
m = 10 kg
F_x = (10 kg) * a_x
vf_x^2 = vi_x^2 + 2 * a_x * d_x
vf_x^2 = (10 m/s)^2 + 2 * (3 m/s^2) * (5 m)
Remember that when you multiply values, you multiply their units as well. That is, the units of the whole product are the product of the units of the parts:
F_x = (10 kg) * (5 m/s^2)
F_x = 50 kg*m/s^2
F_x = 50 N ;
equivalent to previous equation, since 1N = 1 kg*m/s^2
In some cases you may want to express a value as the product of a dimensionless number and a number with units. For example, if you are given a time as a sum of some numbers of hours, minutes, and seconds, it might be convenient to enter it in a form like this:
t = 3*(3600 s) + 47*(60 s) + (36 s)
The right hand side is a sum of three numerical values in seconds, so the result will be in seconds, which is what you want.