Two circles of radius \(R\) intersect at points \(D\) and \(B\). Let \(F\) and \(G\) be the points of intersection of the middle perpendicular to the segment \(BD\) with these circles lying on one side of the line \(BD\). Prove that \(BD^2 + FG^2 = 4R^2\).