Hi @mattll218 and welcome to the SAS Support Communities!
Sorry to hear that your professor didn't help you.
I see a common issue in your two programs regarding the graph: The range of x-values doesn't include the value of interest, i.e., the argument maximizing the log-likelihood function. In the program for HW 1 that x-value is p2=-58.7143, whereas your DO loop
do i =1 to 250;
p2=-100+(i-1)*0.01;
...
end;
covers only the range from -100 through -97.51 (=-100+(250-1)*0.01). Compare this to the corresponding loop in the code key
do i =1 to 200;
p2=-68.5+(i*0.1);
...
end;
where the range of p2 values from -68.4 through -48.5 is (almost) centered around -58.7143.
Similarly, in your program for HW 2 the mu range from -50 through -38.02 doesn't contain 124.20, which seems to be the mu value of interest according to your REFLINE statement.
So, in both cases adjust the step size and/or the ending value of the DO loop in order to include the relevant portion of the graph.
I hope that this resolves the issue because, lacking a SAS/IML license, I can't be of much help regarding the IML code (but other community experts can).