Help writing the following query to relational algebra
This line represents a cartesian product of 3 tables:

FROM student a, enrolled i, class d


After creating a cartesian product you filter out rows that match the predicate. 

WHERE a.id= i.student_id
AND i.disc_id = d.id


If you look closer at this query it is equivalent to:

  SELECT a.name, d.name. d.grade
    FROM student a
      JOIN enrolled i ON a.id= i.student_id
      JOIN class d ON i.disc_id = d.id


Maybe you should analyze the second query.