You can do it by construction the regular expression for the FA.

For the first, it will be: 0(0+1)*0 + 0

For the second, it will be: 0(0+1)*0 + 1(1+0)*1 + 0 + 1

For the first, it will be: 0(0+1)*0 + 0

For the second, it will be: 0(0+1)*0 + 1(1+0)*1 + 0 + 1