I'd do the 5 rep sets before the 10 rep sets.
Optimal? Well, if you stick to compound movements and do the 5 rep sets first. It is decent. Provided you train hard and eat well, hitting those rep ranges should allow you to progress in strength and hypertrophy.
James 1:16-17 ESV
Do not be deceived, my beloved brothers. Every good gift and every perfect gift is from above, coming down from the Father of lights
With God's help...Mens sana in corpore sano