Save object's bounding box position in a text file, and export RGB and depth images

this is my first time to use blender as I just have a small question and hope if anyone could advise me. I have a .blend file found here https://www.dropbox.com/s/7a19k0pcjabczff/untitled1.blend and I’m asking if anyone could assist me in doing two things:
1- I want to save the positions (x y width height) of the bounding box of the moving object for every frame in the file attached, and save them in a text file where each line will have the x y width height of the bounding box in each frame, e.g line one will have x y width and height of the bounding box in frame 1,… and so on.
2- I want to export 2 images for every frame, one RGB and the other Depth image depending on the Z position away from the camera location.

So if anyone could please advise me as its kind of urgent for me.