Look at this equation:
3kg + 6 kg = 9m
The numbers are correct but the units make it nonsense.
For an equation to make sense, the units on one side must be the same as on the other. The equation must be homogenous.
Some examples are not quite so easy. Look at this equation:
6kg x 3 ms-2 = 18N
This equation is actually correct (It's an example of Newton's Second Law).
F = m.a
What it shows is that newtons are equivalent to kg.ms-2.
In fact, that is how you work out derived units. Think of an equation for the units that you want and put in the base units. Let's look at an example. Find the base units for joules.
An equation for joules (energy) is work = force x distance.
Put the units in the right hand side.
Force x distance is equivalent to newtons x metres.
But newtons x metres is equivalent to kg.ms-2 x m (see above for where I got the base units for newtons.)
Simplified that becomes kg.m2s-2. That's the units for the right hand side of the equation. And because the equation is homogenous, that must be the units of the left hand side too. So joules are equivalent to kg.m2s-2.