Let's analyze the parts of the sentence:
S. if you do your work – This sets the condition.
P. with dedication and honesty – This adds details about how the work is done.
Q. people will know – This gives the result.
R. how hard you have tried – This tells what people will know.
Now, putting them in logical order:
S. if you do your work – condition
P. with dedication and honesty – describes the manner of the work
Q. people will know – consequence
R. how hard you have tried – object of what people will know
So the correct order is: SPQR