Retirement tax questions

I am trying to verify whether this works for a partial Rollover Distribution return.  In my case, I withdrew $48,000 from one IRA, and then prior to the end of summer deadline, I put $5,000 back in.  I got the same basic things on the institution forms:  $48k on a 1099-R and $5K on a 5498.  I'm trying to verify that my taxable income from that distribution is $43K and not $48k.