@Maple_lover1 You are setting all the coefficients zero to make the whole thing zero. So if the whole thing is zero, the numerator zero will be zero, and you can just work with that (provided the denominator doesn't go to zero).
As for the P values set to 1, I have no idea - I just noticed that that worked. Your problem doesn't say what to do about the sines, but somehow they disappear.
The d_1 is in the third equation in your post - perhaps it is a typo? or something else about the problem?
In terms of solve, there are 3 equations, so I always choose which 3 variables to solve for. In your set 1 answers, you had a=a, meaning a can be anything and the others can be in terms of a. So for set 1, I left out a.
In your set 2 answers, there is a=a, so I left out a, but it didn't work.
In general solving 3 equations for 4 unknowns won't give anything, but if it does (as here) you don't get to choose what depends on what. Here there is some dependence between the variables that I didn't think about, but which has something to do with why set 2 didn't come out as I expected.