While I usually do not respond to a question another tutor has already answered, I think there is an easier way to solve this problem.
The hypotenuse of this 3-4-5 triangle is 5a to the third power (as you have written it).
The perimeter is the sum of 3a to the third power + 4a to the third power + 5a to the third power.
As the first tutor suggested it is difficult to be sure what you meant by 3a to the third power etc; therefore, I have just used your notation.