In a right triangle, the measure of the legs are 20 and 3x, and the measure of the hypotenuse is 4x+1. Find the value of x.

20^2+3x^2=(4x+1)^2