DLX new instruction

can i get an explanation for how they did these steps?

I’m not sure what you’re asking for but this question is pretty similar to the one I solved in the tigbur on Thursday. I suggest watching it’s recording and trying to understand the solution yourself.
The tricky part here is using the imm field to mask RS1 and getting the string that we wish to save into RD. notice that the output of IRenv is sext(imm). This is why the imm field is chosen to be 0,1^15 and not the all ones string, then it’s fixed using a LLS and addition of 1 to recieve a string of 16 zeros followed by 16 ones, which is exactly the mask we need.