By using the two angles given, we can create a triangle similar to the triangle we desire. We then can find the perimeter of this triangle and use it to find the proper ratio to cut the given perimeter and find the length of each side.
Above, the triangle AXY is constructed such that angle A equals the given angle A, angle X equals the given angle B, and AX is equal to the given perimeter.
Now, all that remains is to construct a triangle similar to AXY with side lengths as above.
Click here for a GSP sketch of the above construction.