I have a cube positioned at the origin $(0,0,0)$, and a point in 3D space (it's considered a camera ) and I know its position and where it's looking.
Now as the camera moves left and right I want the box to rotate with it, i.e I want the front face to stay the same
I'm a little familiar with homogeneous transformation matrix and the stuff related to it but I'm not sure how to apply the transformation or whether this is the right approach. Thanks.
the first image is my initial state (the camera is looking at the box which is at the origin) initial_state the second image is after I dragged my mouse around a little (the scene is not moving of course ...just the camera)some_other_state

Usually, when dealing with 3D rendering, one has
As the cameras position should not influence the rendering of the cube, can't you just not apply the view matrix to the cubes vertices? Alternatively, if you cannot prevent this, apply the inverse view matrix to the cube's vertices. Then the view matrices cancel out and the cube is rendered independent of the cameras position.
If you can zoom into your scene and the cube should stay of the same size (w.r.t the scene), then you have to remove the scaling factor from the view matrix before applying its inverse, e.g. by scaling it to have determinant equal one.