mysql – Relational algebra – 3 tables query

Good afternoon, I have trouble recovering a value from my bank when it has two attributes, I leave this statement.

Select the names of the materials used in the manufacture of the piece with
namep "Medium wooden shelf"

I have this table structure

enter the description of the image here

I've tried to imagine an SQL query to be able to move to relational algebra in the following form:

  Select * from material_peca AS MP join peca AS P on P.codigop = MP.codigop JOIN material AS M on MP.codigom = M.codigom 
where M.nomem = "Tampo Redondo 1m" or M.nomem = "Parafuso 3cm";

However, it returns everything without exception, but I have to do it only when there are two ways, then tried with a select in select:

Select * from material_peca AS MP join peca AS P on P.codigop = MP.codigop JOIN material AS M on MP.codigom = M.codigom 

where M.nomem = "Tampo Redondo 1m" and (select M.nomem from M where M.nomem = "Parafuso 3cm");

This is an exercise to better understand Algebra but I can not understand nor want the bank, if someone can help me … I did this part in algebra but I do not know if it is correct:

P <- πpname (σ codigop = PM01 (material_part | x | part))

M <- π name (material)

P U M