The J or Jal is your hook, now a hook is a jump that normally accurres in the game without you doing anything. So you change it's value to jump to your subroutine (This calls your subroutine). Now where do you put your subroutine? In a nop cave (Huge area of "NOP" or nothing), in every game there is one of these from address 0x00000610 to 0x00004000 so you can pick any address for your subroutine, now make your hook jump to the start of your subroutine (If I started at 0x00001000 I would have my hook's MIPS be J/Jal $08801000) then at 0x00001000 you write your MIPS at.