RMD and Roth

My wife and I are currently drawing RMD's, however, I did work and received several W2's.  How much can I put into a Roth?   I believe it is up $7000 depending on how much I earned. The question is if I earned $5000 can I put $5000 into my Roth and $5000 into my wife's Roth or am I restricted to the total amount earned (W2's) and divide between the two ROTH's?