Yes, photo and caption are essentially accurate.
Some details are not entirely accurate: the arrest was in 1984, the Thatcher quote in 1987, and Cameron's trip in 1989. And although Thatcher labelled the ANC as terrorist, she also pressed the South African president to release Mandela. See below for details.
The photo shows Corbyn under arrest.
Yes, this does show Jeremy Corbyn at an anti-Apartheid protest on 22 July 1984, according to the University of Leicester:
The photograph shows Corbyn being arrested on an anti-apartheid protest in 1984 - and was originally ‘discovered’ through Dr Gavin Brown's “Non-Stop Against Apartheid” research project, funded by the Leverhulme Trust.
"Jeremy Corbyn was one of a small number of politicians who was arrested alongside less famous protesters. In doing so, he helped to defeat the police ban and reinstate anti-apartheid protests in front of South Africa House - where they could have maximum impact on the representatives of the apartheid regime in Britain.
It is probably difficult to objectively determine whether he was “roughed up”, as this term is rather vague. It appears he did not leave voluntarily, and that the police used force to remove him from the protest. This may or may not be considered “roughed up”.
Thatcher called the ANC terrorist (but was more ambiguous about Mandela)
Yes, Margaret Thatcher did refer to the ANC, led by Mandela, as terrorist, but was more ambiguous about Mandela. From a 1987 interview transcribed at margaretthatcher.org:
Just before you, I just remembered I did not answer the second part of the previous question put to me about the ANC, when the ANC says that they will target British companies. This shows what a typical terrorist organisation it is. I fought terrorism all my life and if more people fought it, and we were all more successful, we should not have it and I hope that everyone in this hall will think it is right to go on fighting terrorism. They will if they believe in democracy.
In this interview, she was talking about the ANC in general, and not about Nelson Mandela specifically. 3 years prior, in 1984, she reportedly harangued [the South African President] on why he should let Mandela out of prison. I will leave open the interpretation of those two observations (I'm not sure how to interpret it myself).
David Cameron accepted a paid-for trip to South Africa
According to The Independent:
David Cameron accepted an all-expenses paid trip to apartheid South Africa while Nelson Mandela was still in prison, an updated biography of the Tory leader reveals today.
The trip by Mr Cameron in 1989, when he was a rising star of the Conservative Research Department, was a chance for him to "see for himself" and was funded by a firm that lobbied against the imposition of sanctions on the apartheid regime.
Note that this was 5 years later than Corbyn's arrest, so Cameron was not in South Africa at the exact moment of Corbyn's arrest (or at least not on the funded trip), but both happened during the "Thatcher era" of British politics, so it depends on ones interpretation of "at a time" whether one considers this true or partly true.