i'm not sure exactly what you mean, but it sounds like you want to display the name of the topic for any topics that have recently had a thread added. if so, you are going to need a field in your THREADS table that references the corresponding topic.
suppose your tables are something like this:
THREADS
id
author
subject
tid
TOPICS
id
title
then think about trying a query like this:
$sql = "SELECT t1.author,t1.subject,t2.title FROM threads as t1, topics as t2 WHERE t1.tid=t2.id ORDER BY id DESC LIMIT 0, 8";
I haven't test that, but i think it's close. if you're using mysQL then you should think about getting phpMyAdmin. you can test queries with it. super useful.