Sentence A means that you know what your objective is, but maybe you're not sure you're going in the right direction to get to it. Like if you buy a "put together yourself" chair, and are reading the instructions but what you've put together yourself isn't looking quite right, you might ask yourself "Am I building the product right?"
Sentence B means that you aren't sure what your end product is, but you are building something. For instance, say you purchase the same "put together yourself" chair, but the instructions are all in a foreign language you don't understand, so you can't confirm it's the right product immediately. You try to put it together yourself based on some diagrams but as you start to put it together it looks more like a table than a chair. In this case, you might ask yourself "Am I building the right product?"
Do you understand?