Problem when moving and changing object pose at the same time
From what I understand, here is what I'd say:


First, maybe enable the "Only Include Channels Relating to Selected Objects and Data" option (arrow icon in the Dopesheet). It will only display, in the Dopesheet, the keyframes of the object(s) you've selected in the 3D view, and it will make the things simpler to understand.
Select the object itself (not the armature). If you go in the Dopesheet window, you can see that there's a track called Cube > CubeAction, and that 2 keyframes have been created for the cube object. I think it's useless and even may create some problems because in your case you've actually created an armature and parented your object to it, so from now on it's the armature that is supposed to move your object! So select these keyframes and delete them.
Select the armature. If you go in the Dopesheet, you can see the Armature > ArmatureAction track, it has 2 keyframes. Nice, it's probably what you want, the armature is the parent of the cube and to move the cube you need to move the armature. Keep these keyframes.
Keep in mind that until now you've just animated the armature in Object mode, you haven't moved any bone in Pose mode. So until now the armature works like a basic parent, for example like an empty would.
Now you want to move some bones within the armature. Keep your armature selected and go in Pose mode. Rotate the bone you want and press i to insert a keyframe. In the Dopesheet, if you unfold the Armature > ArmatureAction track, you'll see that a Bone track has been created. But before that, no keyframe was created on this track, so if you want your bone to have another position before the one you've created, put your cursor one frame before, press altR to reset the bone position, and press i to insert a keyframe. Now you have 2 keyframes and the bone will have its basic position at the start of the animation.
You could also have chosen to create the whole movement of your armature (on the X and Y axis) in Pose mode, moving the bones from position to position B, instead of creating an object animation, it's a choice that depends on the situation.
To automatically record a keyframe (i.e. avoid the i command) you need to press the "Automatic Keyframe Insertion" button in the Timeline (red circle icon).